Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Which programming language is fastest? (debian.org)
29 points by alifaziz on Aug 3, 2010 | hide | past | favorite | 26 comments



The fastest language is the one that you know well enough that you are actually able to implement and release your ideas to your users. Benchmarks speed is only one part of the equation.


Nope - that's the fastest language for you.


I once heard a joke related to this: Dev1: "Did you know C# is faster than C?" Dev2: "No, really? By how much?" Dev1: "Oh about 6-12 months"


"No. ... No."

Benchmarks are worthless unless they accurately model your application and workload. Is C 42 times faster than Python for doing numerical calculations? No. If you are using NumPy, the difference is more like 10%. (I pulled the 10% figure out of my nether orifice, but I believe it to be in the ballpark.) Yes, I know that NumPy is buckets of C with a tasty Python frosting.


> Benchmarks are worthless unless...

There's a page for that! http://shootout.alioth.debian.org/flawed-benchmarks.php#app

> If you are using NumPy...

http://shootout.alioth.debian.org/u32/program.php?test=spect...


Things we don't need to hear, EVERY LAST TIME anyone says anything quantifiable about programming language performance:

1. People are more or less productive in different languages.

2. If a task can be done mostly in a library the speed of the programming language is less important.

3. The performance difference between languages depends on the workload.


I'm surprised that Racket is beating SBCL. When did that start happening?


They now have JIT compilation.


It didn't - it's an artifact created by munging together different data sets.

Look at a single data set - http://shootout.alioth.debian.org/u32/which-programming-lang...

Better, look at a direct comparison - http://shootout.alioth.debian.org/u32/compare.php?lang=racke...


I don't want the fastest possible language or the most powerful possible language. I want the simplest language that is fast enough and powerful enough. The Benchmarks game is a lot of fun, but if I were making a language (especially one not designed for speed), I probably wouldn't put it up there. It encourages contributors to think "oh crap, if we optimized our X better, we'd be like 4 higher in the listings!" instead of "What sort of useful code can I write?".


I'm impressed that PHP is now less than 20x slower than SBCL and Racket (Lisp and Scheme implementations). It's improved a lot since PHP4.


Assembly Language, I guess.


With so much variation in the time measured for a given language? Fastest to slowest is approaching a factor of 100 in some cases.

This study is useless (even if meaningful) with this much variation, and no clear explanation for why so.


> Fastest to slowest is approaching a factor of 100 in some cases.

Which cases?


GHC Haskell is doing surprisingly well. That must be a testament to the extremely high quality of the GHC code generator and optimizer.


Static type gives compiler plenty of information for analysis and can generate very optimized code.


You have to click around to see it, because the default rendering only includes GNU C++, not GNU C.



How about LLVM C & C++ ?


Here's where you can download the Python measurement scripts so you can make those LLVM measurements and publish them - http://shootout.alioth.debian.org/help.php#languagex


let's kill all the language lawyers...


Also notice, time is plotted on a log scale.


Seems quite different compared to what I remember previously. Have some communities been updating their interpreters/compilers to optimize for these tests?

(Reminds me of the 1990s when Intel built a special machine (which you could theoretically buy, to fulfill the demands) and wrote a special compiler for SPECs... :-)


Could be?... but I suspect its more communities optimising their benchmark programs.

See footnote: Which programming language is fastest? No. Which programming language implementation has the fastest benchmark programs?


The most interesting changes to me are Javascript V8, Racket, LuaJIT.


> Seems quite different compared to what I remember previously.

The simple explanation is that you don't remember very well what you saw when you looked previously.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: