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

vs

 1 : Are the PyPy programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest PyPy program used compared to the fastest Python 2 program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the PyPy programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest PyPy program used compared to the fastest Python 2 program.

(Memory use is only compared for tasks that require memory to be allocated.)

 PyPy used what fraction? used how many times more? 
Benchmark Time Memory Code
 n-body1/12 ±
 spectral-norm †1/10 ±
 fannkuch-redux1/6 ±
 fib501/5 ±
 jsonbench1/5 ±
 richards1/4 ±
 fasta1/3 ±
 meteor-contest1/3 ±
 thread-ring1/3 ±
 fibonacci1/3 ±
 pystone1/2?±
 iobench1/2 ±
 pidigits± ±
 k-nucleotide?±
 binary-trees±
 regex-dna †?±
 PyPy used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/121/121/51/3±

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the PyPy programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest PyPy program are shown for comparison against measurements of the fastest Python 2 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 n-body 
PyPy3.243.2668,9921337  1% 99% 0% 0% 0% 0% 0% 0%
Python 238.7838.786,6841337  0% 0% 0% 0% 0% 1% 0% 100%
 spectral-norm 
PyPy0.090.11?594  0% 0% 0% 0% 82% 0% 0% 0% †
Python 24.231.1311,728595  78% 71% 51% 30% 25% 35% 40% 59% †
 fannkuch-redux 
PyPy1.280.4979,1761009  18% 56% 59% 4% 40% 36% 0% 56%
Python 211.022.8511,4601009  6% 4% 97% 95% 94% 0% 1% 96%
 fib50 
PyPy0.480.5073,844130  2% 2% 2% 2% 0% 96% 0% 0%
Python 22.402.4037,872130  0% 0% 100% 0% 0% 0% 0% 0%
 jsonbench 
PyPy0.920.9476,244322  0% 0% 99% 0% 0% 1% 0% 0%
Python 24.254.2615,884322  0% 0% 100% 0% 0% 0% 0% 0%
 richards 
PyPy0.190.20?2423  95% 0% 0% 0% 0% 0% 0% 5%
Python 20.870.876,3482423  1% 0% 100% 0% 1% 0% 0% 0%
 fasta 
PyPy1.731.7374,192900  100% 0% 1% 0% 0% 0% 0% 0%
Python 25.875.9112,988900  0% 0% 1% 0% 0% 99% 0% 0%
 meteor-contest 
PyPy0.680.6977,2281485  0% 97% 0% 0% 0% 0% 1% 0%
Python 22.142.146,8281485  0% 0% 100% 0% 0% 0% 0% 1%
 thread-ring 
PyPy0.110.13?407  0% 0% 7% 0% 85% 0% 0% 0%
Python 20.380.392,800407  3% 3% 97% 0% 0% 0% 0% 0%
 fibonacci 
PyPy0.170.19?181  5% 0% 0% 0% 0% 0% 89% 0%
Python 20.490.496,772181  0% 100% 2% 0% 0% 0% 0% 0%
 pystone 
PyPy0.090.11?2301  0% 17% 0% 0% 0% 80% 0% 0%
Python 20.200.20?2301  0% 0% 0% 0% 0% 100% 0% 0%
 iobench 
PyPy14.1514.1777,364370  1% 0% 0% 0% 1% 0% 100% 0%
Python 224.8624.866,336370  0% 0% 100% 0% 0% 0% 0% 0%
 pidigits 
PyPy2.983.0078,280322  0% 0% 0% 1% 98% 0% 0% 2%
Python 22.132.137,128322  0% 0% 0% 0% 1% 0% 100% 0%
 k-nucleotide 
PyPy0.090.11?593  0% 0% 0% 0% 0% 0% 0% 82%
Python 20.070.07?593  100% 0% 0% 0% 0% 0% 0% 0%
 binary-trees 
PyPy2.291.0692,236743  30% 29% 27% 24% 26% 67% 21% 23%
Python 22.020.4716,340743  54% 57% 56% 54% 64% 57% 63% 54%
 regex-dna 
PyPy0.110.12?501  8% 0% 0% 0% 77% 0% 0% 8% †
Python 20.030.03?501  100% 0% 0% 0% 0% 0% 0% 33% †
 templates 
PyPy2.482.5398,024307  0% 0% 0% 0% 100% 0% 0% 0%
No program
 fasta-redux 
PyPy0.190.21?1115  0% 5% 0% 0% 0% 90% 0% 0%
No program
 reverse-complement 
PyPy0.060.06?455  0% 25% 0% 0% 0% 0% 100% 0%
Python 20.01?432  
 chameneos-redux 
PyPy190.59145.4270,1801192  4% 6% 5% 7% 9% 7% 10% 10%
No program
 mandelbrot
   No programs
 binary-trees-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other PyPy programs for these benchmarks?

Remember - those are just the fastest PyPy and Python 2 programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for PyPy.

Maybe one of those other PyPy programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest PyPy and Python 2 programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 PyPy : the old PyPy 

Revised BSD license

  Home   Conclusions   License   Play