The Computer Language
22.05 Benchmarks Game

spectral-norm

First a few simple programs.

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

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

  source secs mem gz    
  Go #4 1.43 1,952 548    
  Chapel 1.45 5,560 310    
  Julia #2 1.53 200,160 370    
 
 
 
× source secs mem gz cpu cpu load
1.0 Rust #5 0.71 2,560 1055 2.84 99% 100% 100% 99%
1.0 Rust #4 0.72 2,640 817 2.84 100% 99% 99% 100%
1.0 Rust #7 0.72 2,436 932 2.84 99% 100% 99% 100%
1.0 Classic Fortran #3 0.72 1,800 638 2.86 100% 99% 100% 100%
1.0 Chapel #2 0.73 5,560 335 2.88 99% 99% 100% 99%
1.6 Julia #4 1.11 188,696 429 3.72 79% 99% 79% 78%
2.0 C gcc #3 1.43 1,348 463 5.68 100% 100% 99% 99%
2.0 Go #4 1.43 1,952 548 5.67 99% 99% 100% 99%
2.0 Swift #3 1.43 6,876 601 5.68 99% 100% 100% 100%
2.0 Free Pascal #3 1.44 1,456 625 5.70 99% 99% 99% 99%
2.0 Free Pascal #2 1.44 1,376 542 5.70 99% 99% 99% 99%
2.0 Go #2 1.44 1,420 668 5.68 99% 98% 99% 99%
2.0 Lisp SBCL #8 1.44 24,160 791 5.69 99% 99% 99% 99%
2.0 Lisp SBCL #3 1.45 24,168 890 5.69 99% 99% 99% 99%
2.0 Lisp SBCL #7 1.45 24,144 762 5.69 99% 99% 99% 99%
2.0 Lisp SBCL #2 1.45 24,188 915 5.69 99% 99% 99% 99%
2.0 Ada 2012 GNAT #3 1.45 4,752 1717 5.72 99% 98% 99% 99%
2.0 Chapel 1.45 5,560 310 5.77 100% 99% 99% 100%
2.0 Dart #6 1.45 22,384 1196 5.69 98% 98% 98% 98%
2.1 Haskell GHC #4 1.47 4,536 987 5.69 97% 96% 97% 97%
2.1 C# .NET #3 1.52 33,368 878 5.78 95% 95% 94% 97%
2.1 C++ g++ #8 1.53 1,348 1278 6.09 100% 100% 100% 99%
2.1 Julia #2 1.53 200,160 370 5.12 79% 79% 99% 78%
2.1 F# .NET #2 1.53 33,212 853 5.80 93% 94% 97% 94%
2.2 Java  #3 1.55 38,428 756 5.94 97% 95% 96% 95%
2.2 F# .NET #4 1.55 34,468 732 5.80 97% 92% 92% 92%
2.4 Node js #6 1.69 90,932 999 6.20 95% 90% 90% 92%
3.7 Java #2 2.61 37,368 950 10.07 98% 96% 97% 96%
3.7 Classic Fortran #2 2.66 1,972 513 2.66 0% 0% 0% 100%
4.6 Dart #2 3.27 31,228 1168 12.58 96% 96% 96% 97%
7.4 OCaml #2 5.32 3,932 377 5.32 0% 0% 0% 100%
7.4 Go 5.32 2,452 411 5.33 1% 100% 0% 0%
7.5 Swift 5.32 12,872 438 5.32 1% 0% 0% 100%
7.5 Dart 5.32 9,164 461 5.32 0% 100% 0% 0%
7.5 Lisp SBCL #6 5.33 25,380 505 5.33 0% 1% 100% 0%
7.5 Lisp SBCL 5.33 29,364 631 5.33 1% 1% 0% 100%
7.5 Ada 2012 GNAT 5.36 2,544 716 5.36 1% 100% 1% 1%
7.5 C++ g++ 5.36 1,964 452 5.36 100% 2% 0% 0%
7.5 Node js #7 5.38 41,524 414 5.38 0% 0% 0% 100%
7.5 C gcc 5.38 1,248 383 5.38 0% 100% 0% 0%
7.6 Node js 5.45 41,668 319 5.45 1% 0% 100% 0%
9.9 PHP 7.05 35,208 1152 27.96 99% 99% 99% 99%
14 Java 9.73 37,288 514 9.76 1% 0% 100% 0%
16 Erlang #2 11.35 47,752 747 44.63 98% 98% 98% 99%
16 Free Pascal 11.77 8 423 11.77 100% 0% 0% 0%
21 PHP #3 15.08 40,068 1210 60.02 100% 100% 100% 100%
29 VW Smalltalk #2 20.56 246,440 1047 62.28 75% 77% 73% 78%
33 Perl #4 23.48 12,044 555 92.70 99% 99% 99% 99%
41 Racket 29.48 66,852 446 29.47 100% 0% 0% 0%
69 VW Smalltalk 49.22 55,100 642 49.21 0% 100% 0% 0%
78 PHP #2 55.82 13,444 397 55.81 0% 0% 100% 0%
82 Ruby #5 58.81 288,548 758 216.98 91% 91% 94% 93%
87 Erlang 62.47 46,904 507 62.53 0% 0% 100% 0%
113 Lua 80.47 2,832 329 80.47 100% 0% 0% 0%
140 Perl #5 99.90 7,732 340 99.89 0% 0% 0% 100%
147 Perl 105.24 7,708 333 105.24 100% 0% 0% 0%
159 Ruby #4 113.60 287,424 326 113.59 0% 0% 100% 0%
167 Python 3 #8 119.21 48,336 407 7 min 99% 99% 99% 99%
174 Python 3 #7 124.23 48,400 417 8 min 100% 100% 100% 100%
176 Perl #3 125.46 18,328 850 8 min 100% 99% 99% 100%
199 Ruby 142.28 286,944 292 142.22 0% 100% 0% 0%
612 Python 3 #6 7 min 9,332 328 7 min 0% 100% 0% 0%
678 Perl #2 8 min 7,040 343 8 min 100% 0% 0% 0%
  Matz's Ruby #5 9 min 19,728 758 34 min 93% 95% 94% 94%
  Matz's Ruby 22 min 6,080 292 22 min 0% 0% 25% 76%
  Matz's Ruby #4 23 min 5,928 326 23 min 0% 0% 0% 100%
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu cpu load
0.6 C gcc #6 0.40 1,068 1197 1.57 100% 100% 100% 98%
1.0 Rust #6 0.72 2,432 1126 2.84 100% 100% 100% 100%
1.0 C++ g++ #6 0.72 1,348 1044 2.85 100% 99% 100% 99%
1.0 C gcc #5 0.72 1,344 569 2.85 99% 99% 100% 100%
1.0 C gcc #4 0.72 1,352 1139 2.85 100% 100% 99% 99%
1.0 Rust #2 0.73 1,312 1110 2.87 99% 99% 99% 99%
1.0 Rust 0.74 1,276 1254 2.87 97% 99% 99% 97%
1.1 Ada 2012 GNAT #4 0.76 4,832 2770 2.95 97% 99% 97% 97%
1.1 Rust #3 0.76 1,248 1053 2.98 97% 99% 97% 99%
1.1 C# .NET #5 0.82 35,524 764 2.97 89% 96% 89% 89%
1.9 C++ g++ #5 1.32 2,048 1044 5.26 100% 100% 99% 100%
5.3 Racket #3 3.79 65,100 627 14.71 99% 96% 97% 96%
7.5 Haskell GHC #2 5.33 7,592 403 5.33 100% 1% 0% 0%
21 Racket #2 14.99 65,336 532 14.99 0% 0% 100% 0%