OrderLanguageImplementationCodeRelative
Time
1Python3 CPython 3.9.5 dynamic.py 494.67
2Python3 CPython 3.9.5 with -O dynamic.py 490.50
3Python2 CPython 2.7.18 dynamic.py 499.18
4Python2 CPython 2.7.18 with -O dynamic.py 501.00
5Python3 Cython 0.29.23 dynamic.py 355.32
6Cython Cython 0.29.23 static.pyx 9.98
7Python2 Jython 2.7.2-DEV dynamic.py 194.20
8Python3 Numba 0.53.1 mandel_numba.py 11.14
9Python3 Pythran 0.9.11 mandel_pyth.py 10.76
10Python3 Nuitka 0.6.15 dynamic.py 601.15
11Python3 Pyston 2.2.0 dynamic.py 199.61
12Python3 Cinder 3.8.5+cinder dynamic.py 589.80
13Python3 GraalVM 20.2.0 dynamic.py 13.57
14Python2 PyPy2 7.3.3 dynamic.py 9.91
15Python3 PyPy3 7.3.5 dynamic.py 9.93
16Haskell GHC 8.8.4 mandel.hs 257.93
17Haskell GHC 8.8.4 with -O3 mandel.hs 16.82
18C GCC 10.3.0 mandel.c 17.46
19C GCC 10.3.0 with -O3 mandel.c 10.00
20C GCC 10.3.0 with -march=native mandel.c 10.37
21C Clang version mandel.c 17.45
22C Clang version with -O2 mandel.c 10.50
23C GraalVM (+ Clang) 20.2.0 mandel.c 10.97
24C pcc 1.2.0.DEVEL mandel.c 17.43
25C pcc 1.2.0.DEVEL with -O2 mandel.c 17.43
26C tcc 0.9.27 mandel.c 17.44
27Java Oracle Java 16.0.1 Mandel.java 10.62
28Java Oracle Java 16.0.1 with -server Mandel.java 10.61
29Java OpenJDK 17 Mandel.java 10.61
30Java OpenJDK 17 with -server Mandel.java 10.59
31Java GraalVM 20.2.0 Mandel.java 11.18
32OCaml OCaml 4.11.1 with ocamlopt mandel.ml 15.11
33OCaml OCaml 4.11.1 with ocamlc mandel.ml 166.26
34Scala Scala 2.11.12 on OpenJDK Mandel.scala 13.39
35Kotlin Kotlin 1.5.10 on OpenJDK mandel.kt 11.07
36Kotlin Kotlin 1.5.10 with -jvm-target mandel.kt 11.06
37C# .NET core 5.0.300 Mandel.cs 19.54
38JavaScript V8/NodeJS 7.8.279.23-node.45 mandel.js 10.42
39JavaScript SpiderMonkey 78.4.0 mandel.js 10.39
40JavaScript Rhino 1.7.7.2 mandel.js 68.39
41JavaScript GraalVM 20.2.0 mandel.js 11.08
42Dart Dart 2.13.1 mandel.dart 11.20
43Rust Rust 1.50.0 mandel.rs 87.31
44Rust Rust 1.50.0 with opt-level=3 mandel.rs 10.34
45Go gccgo 10.3.0 mandel.go 18.02
46Go gccgo 10.3.0 with -O3 mandel.go 10.62
47Go golang-go 1.16.2 mandel.go 10.85
48Nim Nim 1.4.2 mandel.nim 19.82
49Nim Nim 1.4.2 with --opt mandel.nim 10.00
50Ruby Ruby 3.0.0 mandel.rb 513.87
51Ruby Ruby 2.7 2.7.2 mandel.rb 450.17
52Ruby JRuby 9.2.9.0 mandel.rb 662.18
53Ruby GraalVM 20.2.0 mandel.rb 10.63
54R R 4.0.4 mandel.R 297.99
55R GraalVM 20.2.0 mandel.R 33.83
56PHP PHP 7.4.16 mandel.php 92.53
57PHP HHVM 4.111.0 mandel.hack 10.71
58Hack HHVM 4.111.0 mandel-typed.hack 10.44
59RPython PyPy rpython translator targetmandel.py 10.52
60C PicoC 10.3.0 compiled with -O3 mandel.c 7190.17
61Haskell Hugs September 2006 mandel.hs 15367.78

Times are measured by calling getrusage before and after running the subprocess, and summing the difference in the ru_utime and ru_stime. Only the test code itself is timed, not any compilation process. The tests were done on a processor that reported itself as “Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz”.

Each test generated a 800×320 Mandelbrot set, with at most 60000 iterations on each pixel (except the slowest tools, where the time is extrapolated from 600 iterations). The test was repeated 3 times, and the times averaged. Actual times: 1 “time unit” = 1.15 s.