The Computer Language
22.05 Benchmarks Game

mandelbrot

First a few simple programs.

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

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

  source secs mem gz    
  Intel C #2 22.98 1,252 400    
  Classic C #2 24.76 1,324 400    
  C clang #2 25.27 996 400    
  C gcc #2 25.30 1,040 400    
 
 
 
× source secs mem gz cpu cpu load
1.0 C++ g++ #0 1.03 34,712 2739 4.06 98% 99% 99% 98%
1.0 Rust #6 1.06 33,872 1332 4.18 100% 98% 98% 98%
1.3 Rust #8 1.38 32,624 763 5.48 99% 99% 100% 99%
1.3 Rust #7 1.38 32,732 757 5.50 100% 99% 100% 100%
1.3 Rust #3 1.39 12,824 1007 5.52 100% 99% 100% 99%
1.4 Classic Fortran #8 1.41 35,968 957 5.60 100% 99% 99% 99%
1.4 Julia #7 1.42 236,644 619 5.08 87% 86% 87% 99%
1.4 Julia #8 1.46 236,112 624 5.24 86% 99% 87% 87%
1.6 Julia #5 1.62 272,904 571 5.94 90% 99% 89% 90%
1.6 C gcc #8 1.63 33,068 782 6.29 96% 96% 96% 100%
1.7 Rust 1.79 38,672 868 6.87 94% 97% 95% 99%
2.0 Julia #6 2.03 253,220 562 5.87 50% 90% 60% 90%
2.0 Julia #3 2.10 273,584 579 7.77 90% 99% 91% 90%
2.2 Chapel #3 2.24 36,184 591 8.80 99% 98% 98% 99%
2.5 Rust #5 2.62 33,948 719 10.40 99% 100% 99% 100%
2.6 Julia #4 2.71 257,796 574 7.69 91% 56% 91% 47%
3.1 Classic Fortran #6 3.22 76,148 661 10.63 77% 77% 77% 100%
3.4 C++ g++ #9 3.50 34,428 726 13.48 95% 99% 95% 96%
3.6 Go #4 3.73 33,812 905 14.85 100% 100% 100% 100%
3.6 Go #3 3.74 34,028 894 14.91 100% 100% 100% 99%
3.7 Free Pascal #8 3.87 31,080 952 15.40 100% 100% 100% 99%
3.9 Ada 2012 GNAT #3 3.99 36,256 1819 15.82 99% 99% 99% 99%
3.9 Node js #3 4.06 118,180 1122 16.00 98% 100% 98% 99%
4.0 C# .NET #5 4.11 64,376 839 16.15 99% 98% 99% 98%
4.0 Java  #2 4.12 68,860 796 16.21 98% 99% 99% 98%
4.0 C gcc #9 4.15 32,904 694 16.03 96% 100% 95% 95%
4.0 Lisp SBCL #4 4.17 54,952 2447 16.64 100% 100% 100% 100%
4.0 Dart #4 4.18 42,996 982 16.37 97% 96% 100% 99%
4.2 Java #6 4.31 67,432 802 16.92 98% 98% 99% 99%
4.3 Java #4 4.43 66,304 660 16.16 87% 84% 95% 99%
4.4 Lisp SBCL 4.58 54,992 2473 16.51 100% 79% 99% 84%
4.7 C++ g++ #8 4.81 34,448 742 13.19 100% 38% 38% 100%
4.7 Go 4.91 32,600 823 19.58 100% 100% 100% 100%
6.4 Free Pascal #7 6.57 36,828 924 26.12 100% 99% 100% 100%
6.4 Haskell GHC #2 6.58 46,620 782 26.22 100% 100% 100% 100%
6.4 Chapel 6.64 36,128 460 26.37 100% 99% 99% 99%
6.6 Go #2 6.79 33,196 837 27.07 100% 100% 100% 100%
6.6 Go #6 6.85 32,764 700 27.25 100% 100% 100% 100%
7.1 Swift #5 7.30 41,620 659 26.91 100% 90% 90% 90%
7.1 Java #3 7.37 69,200 903 29.18 99% 99% 99% 99%
7.2 Free Pascal #6 7.44 35,920 781 29.66 100% 100% 100% 100%
7.3 OCaml 7.53 4,808 717 30.01 100% 100% 100% 100%
10 Classic Fortran #4 10.30 75,660 618 26.45 33% 90% 91% 43%
11 Lisp SBCL #3 10.87 57,936 894 29.09 34% 34% 100% 100%
11 Free Pascal #2 10.98 32,984 825 29.43 94% 44% 37% 94%
11 Free Pascal 10.99 32,904 825 29.43 94% 44% 37% 94%
11 Dart #6 11.61 84,364 907 31.24 35% 35% 100% 99%
13 C++ g++ #5 13.38 33,640 590 13.37 0% 0% 100% 0%
15 Dart #3 15.59 18,684 614 15.59 0% 100% 0% 0%
17 C++ g++ #2 17.47 34,176 692 17.47 0% 100% 0% 0%
23 PHP #3 23.27 140,544 875 92.75 100% 100% 100% 100%
24 C gcc #2 25.30 1,040 400 25.30 0% 0% 100% 0%
25 Swift 26.23 6,484 394 26.22 100% 0% 0% 0%
26 Free Pascal #3 26.53 8 526 26.53 0% 0% 100% 0%
26 Julia 26.80 210,712 373 27.06 100% 1% 0% 0%
27 Java 27.73 34,252 665 27.75 100% 0% 0% 0%
27 Node js #2 28.20 48,484 416 28.21 0% 0% 0% 100%
27 OCaml #6 28.23 3,252 444 28.23 100% 1% 0% 1%
27 Ada 2012 GNAT #2 28.41 2,524 577 28.41 0% 100% 0% 0%
28 C++ g++ #3 28.53 1,976 414 28.53 0% 0% 100% 1%
29 Dart #2 29.86 18,396 488 29.86 0% 100% 0% 0%
39 Haskell GHC 39.95 517,272 621 41.62 5% 90% 5% 0%
43 Erlang #3 44.63 67,920 792 177.95 100% 100% 100% 100%
44 Classic Fortran #5 45.11 43,800 520 45.10 0% 100% 0% 0%
44 Erlang #4 45.12 62,252 806 179.92 100% 100% 100% 100%
45 Erlang #2 46.22 754,720 613 183.47 99% 99% 99% 99%
47 Erlang 49.00 1,649,612 534 189.73 97% 97% 96% 98%
48 Racket 49.23 66,768 517 49.23 0% 0% 100% 0%
63 Node js 65.25 43,580 373 65.26 0% 0% 0% 100%
82 Lua #6 84.55 23,188 623 295.23 84% 100% 87% 80%
84 PHP 86.95 12,664 449 86.95 100% 0% 0% 0%
98 VW Smalltalk #2 101.26 178,808 929 5 min 89% 77% 90% 96%
144 Dart 148.97 18,176 454 148.96 100% 0% 0% 0%
159 Ruby #5 164.19 324,320 970 10 min 100% 100% 100% 100%
172 Python 3 #7 178.12 46,192 688 11 min 99% 99% 99% 99%
240 Lua #3 248.46 2,696 358 248.45 1% 0% 0% 100%
240 Lua 248.51 2,656 359 248.49 100% 0% 0% 0%
259 Ruby #2 268.05 361,904 880 17 min 100% 100% 100% 100%
269 Lua #2 277.93 1,440 367 277.92 0% 0% 100% 0%
313 VW Smalltalk 5 min 54,944 603 5 min 1% 0% 100% 0%
456 Perl 7 min 62,064 586 31 min 100% 100% 100% 100%
  Ruby #4 14 min 409,304 857 14 min 25% 25% 25% 25%
  Ruby #3 24 min 285,212 307 24 min 0% 0% 100% 0%
  Matz's Ruby #5 32 min 53,240 970 2h 10 min 100% 100% 100% 100%
  Matz's Ruby #2 39 min 64,428 880 2h 37 min 100% 100% 100% 100%
  Matz's Ruby #6 39 min 131,576 918 2h 31 min 96% 96% 95% 95%
  Matz's Ruby #3 2h 03 min 3,208 307 2h 03 min 0% 0% 0% 100%
  Matz's Ruby #4 2h 08 min 103,948 857 2h 08 min 43% 53% 3% 2%
Python 3 #5 Failed
Python 3 #2 Timed Out
Ruby #7 Failed
Ruby #6 Failed
Matz's Ruby #7 Failed
Swift #3 Bad Output
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu cpu load
0.8 C++ g++ #4 0.84 34,720 3542 3.27 100% 98% 98% 100%
0.9 C++ g++ 0.89 32,336 1791 3.48 97% 97% 100% 97%
0.9 C++ g++ #6 0.98 31,792 1002 3.88 99% 99% 99% 100%
1.2 C gcc #6 1.28 31,244 1135 5.12 99% 100% 100% 99%
1.3 Swift #7 1.33 41,804 1140 5.29 99% 100% 99% 99%
1.3 Swift #6 1.37 44,504 1141 5.43 100% 99% 99% 99%
1.4 Haskell GHC #3 1.44 51,516 1981 5.64 99% 99% 99% 99%
3.0 C# .NET 3.11 66,656 1974 12.16 97% 98% 97% 99%
3.0 C# .NET #9 3.12 66,528 816 12.17 99% 97% 97% 97%
3.3 C gcc #4 3.46 32,704 799 13.81 100% 100% 100% 100%
3.4 C gcc 3.48 29,692 822 13.91 100% 100% 100% 100%
3.4 C gcc #7 3.49 33,108 994 13.87 99% 99% 100% 99%
3.4 C++ g++ #7 3.50 34,392 1017 13.92 100% 100% 99% 99%
3.4 C gcc #3 3.50 29,840 763 13.99 100% 100% 100% 100%
3.6 F# .NET #6 3.74 66,476 933 14.65 99% 98% 98% 98%
3.8 F# .NET #5 3.96 66,724 897 15.54 98% 98% 98% 99%
3.9 F# .NET 3.99 66,700 877 15.67 98% 98% 99% 98%
10 Racket #4 10.44 103,948 801 41.19 98% 98% 98% 100%
33 Racket #3 34.63 65,448 802 34.63 100% 0% 0% 0%
50 Racket #2 51.19 65,576 585 51.16 0% 100% 0% 0%