Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

 n-body benchmark N=5,000,000

Each chart bar shows how many times more Memory, one ↓ n-body program used, compared to the program that used least Memory.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Jython 47.8942.473,3801337  13% 32% 42% 14% 3% 4% 2% 4%
1.3MicroPython 96.2796.284,5081315  1% 1% 1% 1% 100% 0% 1% 1%
2.0Python 2 38.7838.786,6841337  0% 0% 0% 0% 0% 1% 0% 100%
2.6Cython 8.338.338,9441392  0% 100% 0% 0% 1% 0% 0% 1%
2.7Python development version 19.4219.428,9921315  70% 0% 0% 0% 30% 1% 0% 1%
3.1Python 3 20.6920.7010,5841315  1% 0% 0% 0% 0% 100% 0% 1%
3.3Nuitka 27.0927.1011,1361315  2% 1% 0% 0% 1% 0% 100% 0%
20PyPy 3 3.193.1967,4641315  0% 0% 100% 0% 0% 1% 0% 1%
22PyPy 2 3.293.2974,8561337  0% 100% 1% 0% 1% 1% 1% 1%
44Numba 42.5942.63148,1161347  30% 67% 10% 9% 37% 16% 10% 15%
221Graal 4.313.45745,9041315  81% 8% 0% 10% 13% 0% 10% 6%
missing benchmark programs
IronPython No program
Shedskin No program
Pyston No program
Grumpy No program
RustPython No program

 n-body benchmark : Double-precision N-body simulation

ndiff -abserr 1.0e-8 program output N = 1000 with this output file to check your program is correct before contributing.

We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

For background information see N-body problem. Useful symplectic integrators are freely available, for example the HNBody Symplectic Integration Package.

Thanks to Mark C. Lewis for this benchmark.

Revised BSD license

  Home   Conclusions   License   Play