Codon VS Python benchmarks

Current benchmark data was generated on Mon Jun 23 2025, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 11ms 0.5ms 7.6MB 0ms 0ms pyston 3.8.12
codon 1-m.py 12ms 0.9ms 8.8MB 20ms 0ms codon 0.18.2
python 1.py 14ms 1.1ms 8.9MB 0ms 0ms cpython 3.13.5
python 1.py 29ms 1.3ms 51.7MB 10ms 10ms pypy 3.10.16

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 2.py 1361ms 5.0ms 57.9MB 1333ms 10ms pypy 3.10.16
codon 1.py 1453ms 224ms 8.8MB 1763ms 0ms codon 0.18.2
python 1.py 2654ms 8.4ms 58.4MB 2627ms 10ms pypy 3.10.16
python 1.py timeout 0.0ms 9.0MB 4990ms 0ms cpython 3.13.5
python 2.py timeout 0.0ms 9.0MB 4990ms 0ms cpython 3.13.5
python 1.py timeout 0.0ms 8.3MB 4990ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 8.1MB 4990ms 0ms pyston 3.8.12

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1-m.py 175ms 4.0ms 8.8MB 483ms 0ms codon 0.18.2
python 2.py 180ms 2.2ms 58.2MB 157ms 10ms pypy 3.10.16
python 1.py 306ms 6.8ms 57.2MB 283ms 10ms pypy 3.10.16
python 1.py 943ms 6.5ms 8.3MB 933ms 0ms pyston 3.8.12
python 2.py 1324ms 11ms 8.1MB 1313ms 0ms pyston 3.8.12
python 1.py 2929ms 30ms 9.0MB 2917ms 0ms cpython 3.13.5
python 2.py 2959ms 13ms 9.0MB 2947ms 0ms cpython 3.13.5

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1-m.py 502ms 15ms 47.7MB 803ms 3ms codon 0.18.2
codon 2.py 1569ms 7.2ms 101.0MB 1877ms 20ms codon 0.18.2
python 1.py 2598ms 50ms 369.6MB 2527ms 57ms pypy 3.10.16
python 2.py 3047ms 54ms 632.9MB 2860ms 173ms pyston 3.8.12
python 1.py 4792ms 40ms 320.4MB 4733ms 43ms pyston 3.8.12
python 1.py timeout 0.0ms 321.4MB 4960ms 20ms cpython 3.13.5
python 2.py timeout 0.0ms 633.8MB 4817ms 173ms cpython 3.13.5
python 2.py timeout 0.0ms 960.0MB 4707ms 283ms pypy 3.10.16

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1-m.py 128ms 2.1ms 18.7MB 437ms 0ms codon 0.18.2
codon 2-m.py 398ms 6.2ms 27.1MB 710ms 7ms codon 0.18.2
python 1.py 555ms 7.1ms 135.3MB 520ms 20ms pypy 3.10.16
python 2.py 736ms 10.0ms 164.3MB 693ms 30ms pyston 3.8.12
python 1.py 1099ms 37ms 86.0MB 1077ms 10ms pyston 3.8.12
python 2.py 1419ms 19ms 165.1MB 1373ms 33ms cpython 3.13.5
python 2.py 1579ms 52ms 290.2MB 1487ms 77ms pypy 3.10.16
python 1.py 2896ms 26ms 87.0MB 2870ms 10ms cpython 3.13.5