The Computer Language
22.05 Benchmarks Game

fannkuch-redux

First a few simple programs.

Then optimisations, multicore parallelism, [pdf] vector parallelism.

Last hand-written vector instructions and "unsafe" programs.

  source secs mem gz    
  Swift 35.27 6,456 451    
  Classic Fortran 38.94 1,636 599    
  OCaml #2 45.04 2,012 473    
 
 
 
× source secs mem gz cpu cpu load
1.0 C++ g++ #5 7.53 2,000 980 29.40 100% 99% 93% 99%
1.0 C gcc #5 7.54 1,072 910 29.38 98% 100% 99% 93%
1.0 Rust #5 7.66 1,368 1016 30.11 99% 100% 96% 99%
1.0 Rust #4 7.67 1,372 1020 30.06 100% 94% 99% 100%
1.0 Rust #3 7.69 1,336 1020 30.07 93% 99% 99% 100%
1.1 Chapel #2 8.08 5,400 731 32.12 100% 99% 100% 100%
1.1 Go #3 8.23 2,260 969 32.88 100% 100% 100% 100%
1.1 Ada 2012 GNAT #3 8.23 4,872 2113 32.71 100% 100% 99% 100%
1.2 F# .NET #6 8.72 32,752 1097 33.86 99% 98% 93% 99%
1.2 OCaml #3 8.97 13,992 1017 35.84 100% 100% 100% 100%
1.2 OCaml #4 8.98 19,812 1004 35.88 100% 100% 100% 100%
1.3 Lisp SBCL #4 9.64 41,844 1527 37.67 99% 99% 99% 95%
1.3 C# .NET #6 9.89 32,152 1068 39.27 99% 99% 100% 99%
1.4 C++ g++ #4 10.28 2,216 1439 40.52 100% 100% 100% 95%
1.4 Classic Fortran #3 10.42 11,084 1158 41.57 100% 100% 100% 100%
1.4 F# .NET #5 10.42 37,736 912 41.06 98% 98% 98% 99%
1.4 Free Pascal 10.56 1,872 1024 42.10 100% 100% 100% 100%
1.4 Java  10.59 35,824 1282 41.74 99% 97% 98% 99%
1.4 C++ g++ #2 10.85 2,224 1440 42.64 99% 95% 100% 100%
1.4 C++ g++ 10.87 2,164 1059 42.76 99% 100% 95% 100%
1.5 Node js #5 11.29 85,336 1313 44.58 99% 99% 99% 99%
1.6 Go 11.86 2,956 900 47.36 100% 100% 100% 100%
1.6 Go #2 11.91 11,316 896 47.56 100% 100% 100% 100%
1.7 Dart #5 12.43 10,628 1220 49.09 99% 99% 99% 99%
2.4 Rust #2 18.34 1,232 1191 72.42 100% 96% 100% 100%
4.1 Lisp SBCL #5 30.56 65,096 681 30.55 0% 0% 100% 0%
4.7 Swift 35.27 6,456 451 35.27 0% 1% 0% 100%
4.8 Lisp SBCL #3 36.45 41,388 826 36.45 2% 0% 1% 100%
5.2 Classic Fortran 38.94 1,636 599 38.94 0% 0% 100% 0%
5.4 C++ g++ #3 40.56 988 593 40.55 100% 0% 1% 0%
5.5 Java #3 41.10 35,324 1257 41.17 0% 0% 100% 0%
5.6 C gcc #3 42.19 1,016 567 42.18 100% 0% 0% 0%
5.7 Dart #3 42.56 10,284 546 42.56 100% 0% 0% 0%
5.7 C gcc 43.27 988 508 43.27 1% 1% 100% 1%
5.8 Julia 43.74 181,932 434 44.01 100% 1% 1% 1%
6.0 Java #2 44.94 34,244 514 44.98 0% 0% 0% 100%
6.0 OCaml #2 45.04 2,012 473 45.04 0% 100% 0% 0%
6.3 Lisp SBCL #2 47.14 26,792 517 47.14 0% 0% 100% 0%
7.0 OCaml 52.70 2,036 524 52.69 100% 0% 0% 0%
7.7 PHP #3 57.76 12,624 1160 230.54 100% 100% 100% 100%
7.8 PHP #4 58.46 47,808 1162 232.59 100% 100% 100% 100%
8.2 Dart #2 62.04 10,328 504 62.04 0% 100% 0% 0%
10 Erlang 74.65 37,384 1038 292.37 99% 100% 99% 94%
25 PHP #2 190.36 12,612 441 190.33 0% 0% 100% 0%
32 PHP 237.29 12,764 482 237.28 0% 1% 0% 100%
34 Ruby #2 259.50 288,852 1455 16 min 100% 98% 92% 100%
37 Haskell GHC 279.36 10,224 559 5 min 37% 19% 27% 22%
45 Python 3 #4 5 min 45,420 950 22 min 97% 100% 100% 100%
54 Perl #2 6 min 12,308 570 27 min 99% 100% 100% 100%
60 VW Smalltalk 7 min 54,996 916 7 min 0% 0% 100% 0%
93 Lua 11 min 1,420 462 11 min 100% 1% 1% 1%
168 Perl #3 21 min 5,064 427 21 min 0% 0% 0% 100%
170 Python 3 #6 21 min 7,432 385 21 min 100% 0% 0% 0%
230 Perl 28 min 5,288 457 28 min 0% 100% 0% 0%
232 Ruby 29 min 285,268 384 29 min 0% 0% 0% 100%
487 Matz's Ruby #2 1h 01 min 17,512 1455 3h 52 min 95% 96% 98% 98%
  Matz's Ruby 2h 57 min 4,612 384 2h 57 min 0% 0% 100% 0%
C# .NET #7 Bad Output
Haskell GHC #3 Make Error
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu cpu load
0.3 C gcc #6 2.09 1,044 1576 8.26 100% 100% 100% 98%
0.3 C# .NET #8 2.13 33,148 1473 8.28 98% 98% 97% 98%
0.4 C++ g++ #6 3.27 2,000 1528 12.93 97% 100% 100% 100%
0.5 Rust #6 3.57 1,372 1253 14.15 100% 97% 100% 100%
1.0 Julia #2 7.80 211,980 1067 29.46 94% 94% 94% 96%
1.1 Swift #3 7.97 6,644 1097 31.59 98% 100% 100% 98%
1.1 Julia #3 8.20 204,120 886 31.21 95% 97% 95% 94%
1.2 C# .NET #9 8.73 32,836 1225 34.63 99% 99% 100% 99%
1.4 Haskell GHC #6 10.31 6,000 1113 40.52 97% 98% 100% 98%
1.4 Haskell GHC #5 10.32 6,196 842 40.82 97% 100% 100% 100%
1.5 C gcc #2 11.46 1,140 1557 45.01 100% 100% 96% 99%
1.8 C gcc #4 13.89 964 1183 13.89 0% 100% 0% 0%
1.8 C++ g++ #7 13.90 992 1150 13.89 100% 0% 0% 0%
4.2 Racket #3 31.35 68,148 1101 120.34 100% 96% 93% 97%
5.1 Haskell GHC #4 38.33 4,940 665 38.35 0% 100% 1% 0%
6.2 Haskell GHC #2 46.65 25,896 808 129.64 70% 70% 70% 70%
15 Racket #2 111.71 66,616 908 111.70 0% 0% 0% 100%
19 Racket 143.11 66,312 649 143.11 0% 0% 100% 0%