OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
↓ Switch from thread to thread passing one token, N=10,000,000.
Which programs used least Code? Which programs use highly optimised assembly code libraries? Which programs make use of all the processor cores?
| sort | sort | sort | sort | |||
|---|---|---|---|---|---|---|
| × | Program & Logs | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
| 1.0 | Haskell GHC #2 | 6.70 | 2,672 | 260 | ||
| 1.1 | Erlang HiPE | 7.49 | 5,368 | 273 | ||
| 1.3 | Mozart/Oz | 8.78 | 3,888 | 340 | ||
| 3.3 | Smalltalk Squeak | 21.95 | 37,016 | 544 | ||
| 5.0 | Smalltalk VisualWorks #2 | 33.29 | 13,012 | 566 | ||
| 6.3 | SML MLton | 41.87 | 6,132 | 361 | ||
| 8.3 | C Intel | 55.80 | 4,584 | 487 | ||
| 8.4 | Scala | 56.44 | 22,752 | 339 | ||
| 8.5 | C GNU gcc | 56.74 | 4,504 | 487 | ||
| 8.5 | Lisaac | 56.85 | 8,596 | 810 | ||
| 8.6 | Pascal Free Pascal | 57.53 | 2,588 | 523 | ||
| 8.8 | Scheme Chicken | 59.08 | 2,612 | 421 | ||
| 9.1 | D Digital Mars | 61.01 | 8,700 | 560 | ||
| 12 | Smalltalk GNU | 78.04 | 9,536 | 551 | ||
| 12 | OCaml #3 | 80.31 | 2,900 | 296 | ||
| 13 | OCaml #2 | 83.89 | 2,896 | 350 | ||
| 13 | Python Psyco #2 | 84.01 | 7,820 | 300 | ||
| 13 | Scheme PLT | 90.12 | 21,388 | 262 | ||
| 15 | C++ GNU g++ | 101.28 | 2,960 | 626 | ||
| 15 | Python CPython #2 | 102.31 | 6,772 | 287 | ||
| 17 | Python CPython | 114.28 | 6,756 | 397 | ||
| 20 | Nice #2 | 132.48 | 23,600 | 382 | ||
| 20 | Java 6 -server #3 | 134.98 | 23,336 | 530 | ||
| 20 | Java 6 -Xms64m #3 | 134.99 | 27,628 | 530 | ||
| 21 | Java 6 -client #3 | 138.09 | 22,456 | 530 | ||
| 22 | Ada 2005 GNAT | 149.89 | 7,752 | 602 | ||
| 25 | C# Mono | 168.87 | 11,956 | 476 | ||
| 27 | Java 6 -Xint #3 | 183.31 | 20,948 | 530 | ||
| 49 | D Digital Mars #2 | 5 min | 2,792 | 555 | ||
| 52 | Java 6 -server | 5 min | 25,364 | 587 | ||
| 54 | Groovy | 5 min | 53,212 | 489 | ||
| 55 | OCaml | 6 min | 3,616 | 282 | ||
| 77 | CAL | 8 min | 27,072 | 927 | ||
| 88 | Ruby JRuby #2 | 9 min | 42,028 | 228 | ||
| 100 | Ruby JRuby | 11 min | 44,256 | 342 | ||
| 282 | Ruby MRI #2 | 31 min | 16,740 | 228 | ||
| 623 | Ruby MRI | 1h 09 min | 12,088 | 342 | ||
| C++ Intel | Failed | 626 | ||||
| Perl | Timed Out | 353 | ||||
| Perl #2 | Failed | 288 | ||||
| Python IronPython | Failed | 397 | ||||
| Python IronPython #2 | Failed | 287 | ||||
| Ruby 1.9 | Failed | 342 | ||||
| Ruby 1.9 #2 | Failed | 228 | ||||
| Tcl | Failed | 445 | ||||
| Zonnon Mono | Failed | 489 | ||||
| Zonnon Mono #2 | Failed | 396 | ||||
| interesting alternative programs | ||||||
| Lua LuaJIT #2 | Failed | 248 | ||||
| Lua #2 | Failed | 248 | ||||
| Python IronPython #3 | Failed | 272 | ||||
| 0.2 | Java 6 -server #2 | 1.21 | 0.00 | 11,900 | 693 | |
| 1.6 | Python CPython #3 | 10.68 | 0.00 | 2,624 | 272 | |
| 2.7 | Lua | 17.95 | 0.00 | 1,280 | 255 | |
| 3.0 | Lua LuaJIT | 19.87 | 0.00 | 3,732 | 255 | |
| missing programs | ||||||
| BASIC FreeBASIC | No program | |||||
| C CINT | No program | |||||
| Clean | No program | |||||
| Eiffel SmartEiffel | No program | |||||
| F# Mono | No program | |||||
| Forth bigForth | No program | |||||
| Forth GNU GForth | No program | |||||
| Fortran G95 | No program | |||||
| Fortran Intel | No program | |||||
| Icon | No program | |||||
| Io | No program | |||||
| Java 1.4 -server | No program | |||||
| Java GNU gcj | No program | |||||
| JavaScript Rhino | No program | |||||
| JavaScript SpiderMonkey | No program | |||||
| Lisp SBCL | No program | |||||
| Lua | No program | |||||
| Lua LuaJIT | No program | |||||
| Mercury | No program | |||||
| Oberon-2 OO2C | No program | |||||
| PHP | No program | |||||
| Pike | No program | |||||
| Prolog SWI | No program | |||||
| Prolog YAP | No program | |||||
| Rebol | No program | |||||
| Scheme Ikarus | No program | |||||
| SML SML/NJ | No program | |||||
diff program output N = 1000 with this output file to check your program is correct before contributing.
Each program should create and keep alive 503 threads, explicity or implicitly linked in a ring, and pass a token between one thread and the next thread at least N times.
Each program should
Similar benchmarks are described in Performance Measurements of Threads in Java and Processes in Erlang, 1998; and A Benchmark Test for BCPL Style Coroutines, 2004. For some language implementations increasing the number of threads quickly results in Death by Concurrency.
Programs may use kernel threads, lightweight threads; but coroutines, cooperative threads and other programs with custom schedulers will be listed as interesting alternative implementations. Briefly say what concurrency technique is used in the program header comment.