Skip to content


The Fastest and the Slowest Programming Language

What can you do when you are to tired to do anything useful but the level of caffeine in your blood is to high for sleeping?

Watching a TV could be a good choice, but who could resist writing a simple Fibonacci recursion in every programming language that you could think of and measuring the calculation time? I couldn’t.

So here are the results of my very scientific study for Fibonacci 33

  1. c
    gcc4.4.1            0.153s
  2. go
    8g                       0.189s
  3. java
    1.6.0_15           0.267s
  4. scala
    2.7.5                  0.324s
  5. javascript
    node.js V8        0.346s
  6. haskell
    ghc6.10.4         1.675s
  7. lisp
    clisp2.44.1       1.888s
  8. ruby
    1.8:                     22.614s
    1.91:                   2.757s
  9. python
    2.6.4:                 4.401s
    3.1.1:                  5.545s
    cxfreeze4.0.1   5.704s
  10. php
    5.2.10                10.341s
  11. prolog
    sicstus4.0.2    >10m (didn’t have patience to wait)
    swi5.6.64        Out of local stack

I have some more ideas, but caffeine level is dropping fast.

Reblog this post [with Zemanta]

Posted in digital world, science world.

Tagged with , , , , , , , , , , .


2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Don Stewart says

    The fib function is part of the recursive benchmark on the Language Benchmarks Game. See the results for dozens of languages here: http://shootout.alioth.debian.org/gp4/benchmark.php?test=recursive

  2. Isaac Gouy says

    See the up-to-date results for dozens of languages here:

    http://shootout.alioth.debian.org/



Some HTML is OK

or, reply to this post via trackback.