Codon VS Python benchmarks

Current benchmark data was generated on Sat Nov 16 2024, 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
codon 1.py 4.6ms 0.6ms 7.4MB 0ms 0ms codon 0.17.0
python 1.py 11ms 0.9ms 7.6MB 10ms 0ms pyston 3.8.12
python 1.py 14ms 1.1ms 8.5MB 0ms 0ms cpython 3.13.0
python 1.py 29ms 1.0ms 51.0MB 10ms 10ms pypy 3.10.14

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 1302ms 15ms 7.9MB 1287ms 0ms codon 0.17.0
python 2.py 1351ms 7.9ms 59.8MB 1323ms 17ms pypy 3.10.14
python 1.py 2634ms 23ms 56.6MB 2610ms 10ms pypy 3.10.14
python 1.py timeout 0.0ms 8.8MB 4987ms 3ms cpython 3.13.0
python 2.py timeout 0.0ms 8.8MB 4990ms 0ms cpython 3.13.0
python 1.py timeout 0.0ms 8.3MB 4987ms 3ms pyston 3.8.12
python 2.py timeout 0.0ms 8.1MB 4987ms 0ms pyston 3.8.12

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 136ms 1.4ms 7.9MB 130ms 0ms codon 0.17.0
python 2.py 176ms 1.4ms 57.6MB 147ms 13ms pypy 3.10.14
python 1.py 301ms 4.2ms 56.6MB 273ms 10ms pypy 3.10.14
python 1.py 926ms 8.6ms 8.3MB 910ms 0ms pyston 3.8.12
python 2.py 1297ms 12ms 8.1MB 1280ms 0ms pyston 3.8.12
python 1.py 3025ms 45ms 8.8MB 3007ms 3ms cpython 3.13.0
python 2.py 3179ms 124ms 8.8MB 3167ms 0ms cpython 3.13.0

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 374ms 2.0ms 46.6MB 357ms 0ms codon 0.17.0
codon 2.py 856ms 4.9ms 99.8MB 833ms 20ms codon 0.17.0
python 1.py 2508ms 22ms 369.0MB 2427ms 63ms pypy 3.10.14
python 2.py 2995ms 49ms 632.9MB 2827ms 153ms pyston 3.8.12
python 1.py 4841ms 38ms 320.4MB 4780ms 47ms pyston 3.8.12
python 1.py timeout 0.0ms 321.3MB 4953ms 27ms cpython 3.13.0
python 2.py timeout 0.0ms 633.6MB 4820ms 160ms cpython 3.13.0
python 2.py timeout 0.0ms 959.3MB 4683ms 300ms pypy 3.10.14

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
codon 1.py 73ms 2.7ms 17.3MB 60ms 0ms codon 0.17.0
codon 2.py 197ms 1.6ms 25.6MB 187ms 3ms codon 0.17.0
python 1.py 539ms 11ms 134.6MB 497ms 27ms pypy 3.10.14
python 2.py 720ms 4.3ms 164.2MB 673ms 30ms pyston 3.8.12
python 1.py 1102ms 6.4ms 86.0MB 1077ms 10ms pyston 3.8.12
python 2.py 1394ms 3.2ms 164.9MB 1350ms 27ms cpython 3.13.0
python 2.py 1533ms 15ms 289.7MB 1447ms 70ms pypy 3.10.14
python 1.py 2681ms 12ms 86.9MB 2650ms 10ms cpython 3.13.0