Re:LispY C
by dreamcompiler on Friday May 13, 2016 @12:41AM
(#11688673)
Some Lisps? Almost all Common Lisps compile to native machine code. Which is why CL programs tend to run orders of magnitude faster than e.g. Python programs. (But they're still typically slower than C because of runtime memory allocation and typetag checking.)
Talking about speed, someone put this online http://www.nexoid.at/tmp/scheme-benchmark-r7rs.html
Chez Scheme (the compiled version vs. Petite Chez) figures high on those lists, and it was just opensourced by Cisco. I used to use Gambit-C, and I still like it, but Chez is fast.
It is and regularly way above the others. I had to hold on my fanaticism.
I am playing with Eduardo Cavazos's libraries with Chez [1], and particularly the port of xspringies. Great fun considering as he points out that the mass-spring calcs are all taking place in scheme. It runs fine on my 2-3 year old notebook.
C was a third language for me in the day, and I like Lisps, so this Lispy-C thing is going to eat my afternoon up!
Re:LispY C
by groovy2shoes on Friday May 13, 2016 @09:55PM
(#11694251)
That would be ecraven (who hangs out in #scheme on Freenode). See also: https://github.com/ecraven/r7rs-benchmarks
For example: https://www.call-cc.org/
That's a full Scheme that compiles to C. It's quite nice, too!
It's a fine compiler for sure, but have you seen the generated C output? It's based on Henry Baker's Cheney-on-the-MTA compilation strategy.
Re:LispY C
by tosseraccount on Thursday May 12, 2016 @11:07PM
(#11688386)
I'm not sure how well known it is, but some Lisps can be statically compiled to machine code.
But one thing I've wondered about is how good can it get? Are there any benchmarks for Lisp vs. C?