News for hackers. Stuff that matters.
Re:How to make Lisp go faster than C [pdf] by greglindahl on Sunday May 30, 2010 @06:24PM (#1391217)
This is typical for papers like this: take a toy algorithm, show it's kinda as fast as C/Fortran if you do something really odd, then declare victory. This works better if your C compiler lacks important optimizations, like a loop nest optimizer.

If you really want to impress people, take a significant algorithm, preferably one of the SPECcpu benchmarks, write the whole thing in Lisp, and then see what happens.

Re:How to make Lisp go faster than C [pdf] by nearestneighbor on Sunday May 30, 2010 @10:52PM (#1391652)
It's not just Lisp. Language advocates are the snake oil salesmen among computer scientists. Case in point: http://www.reddit.com/r/programming/comments/bnnoh/fast_auto...
Re:How to make Lisp go faster than C [pdf] by jgg on Sunday May 30, 2010 @11:19PM (#1391702)
>It's not just Lisp. Language advocates are the snake oil salesmen among computer scientists.

It's true. (-: I submitted the paper mostly because it's a condensed "how-to" for optimizing Common Lisp code. I think the name of the paper itself is really, really sketchy.

Re:How to make Lisp go faster than C [pdf] by j_baker on Sunday May 30, 2010 @06:28PM (#1391225)
I admit to not having read the paper all the way through, but Figure 2 only shows Common Lisp as being noticeably faster than C in one instance, and I suspect that's due to an anomaly of some kind (it's totally out of line with the other C speeds).
Re:How to make Lisp go faster than C [pdf] by Avshalom on Sunday May 30, 2010 @03:59PM (#1391017)
To those who know the SBCL compiler better:

The paper says that to get the speed they had to turn off run time type checking, but they say "here's how to do it globally" does that mean you can turn of type checking in just one module or function?

Re:How to make Lisp go faster than C [pdf] by martincmartin on Sunday May 30, 2010 @04:20PM (#1391054)
Yes. The Common Lisp spec says you can put declarations a lot of places, including prog:

http://clhs.lisp.se/Body/s_declar.htm

So you can basically wrap it around any S-expression you want.

When I was at ITA we did that a lot. For example, there was a macro i+ that would expand to basically "the two arguments are fixnums, as is the result. Now, please give me the sum."

In debug builds, the type declarations would be come assertions. In release builds, they'd become assumptions, i.e. the whole thing would compile to a single x64 ADD instruction.

Re:How to make Lisp go faster than C [pdf] by lispm on Sunday May 30, 2010 @05:55PM (#1391177)
Common Lisp allows you to wrap declarations around forms. Use LOCALLY for that.
Re:How to make Lisp go faster than C [pdf] by swolchok on Sunday May 30, 2010 @06:55PM (#1391267)
Why is the scribd version 1) ugly and 2) in Flash? I thought they were all HTML 5 these days, and I'd clicked the scribd link to give them another chance.
Re:How to make Lisp go faster than C [pdf] by VMG on Sunday May 30, 2010 @06:02PM (#1391185)
barely readable
Re:How to make Lisp go faster than C [pdf] by jgg on Sunday May 30, 2010 @06:12PM (#1391202)
What do you mean? Is it the layout, the content or something else? I was able to read it just fine.
Re:How to make Lisp go faster than C [pdf] by j_baker on Sunday May 30, 2010 @06:25PM (#1391222)
The scribd version is pretty bad.
Re:How to make Lisp go faster than C [pdf] by jgg on Sunday May 30, 2010 @06:29PM (#1391229)
Ah, you're right, that is bad. I had only looked at the raw PDF.
Re:How to make Lisp go faster than C [pdf] by twobar on Sunday May 30, 2010 @06:28PM (#1391226)
The scribd version is nearly unreadable, but the pdf is fine.
Re:How to make Lisp go faster than C [pdf] by VMG on Sunday May 30, 2010 @08:31PM (#1391425)
the scribd version and Gnomes epdfviewer had terrible resolution, so I assumed it was a scanned document.

Evince displays it correctly.

The scribd version seems to be terrible for everybody though

Re:How to make Lisp go faster than C [pdf] by martincmartin on Sunday May 30, 2010 @03:47PM (#1390995)
gcc 4.0.3 vs. CMUCL, the predecessor to SBCL.