Julia VS Python benchmarks

Current benchmark data was generated on Thu Jul 13 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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 13ms 0.6ms 7.3MB 10ms 0ms pyston 3.8.12
python 1.py 14ms 1.4ms 8.5MB 10ms 0ms cpython 3.11.4
python 1.py 30ms 0.7ms 52.1MB 12ms 2ms pypy 3.10.12
julia 1.jl 200ms 0.6ms 216.9MB 112ms 76ms julia/aot 1.9.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 7.jl 600ms 25ms 223.1MB 523ms 63ms julia/aot 1.9.2
python 2.py 1880ms 4.6ms 77.3MB 1853ms 10ms pypy 3.10.12
python 1.py 3370ms 20ms 76.1MB 3337ms 13ms pypy 3.10.12
python 1.py timeout 0.0ms 8.4MB 4983ms 0ms cpython 3.11.4
python 2.py timeout 0.0ms 8.6MB 4983ms 0ms cpython 3.11.4
python 1.py timeout 0.0ms 8.3MB 4980ms 3ms pyston 3.8.12
python 2.py timeout 0.0ms 7.9MB 4980ms 0ms pyston 3.8.12

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 2.py 242ms 1.9ms 77.0MB 217ms 10ms pypy 3.10.12
julia 7.jl 281ms 4.9ms 223.1MB 193ms 73ms julia/aot 1.9.2
python 1.py 381ms 1.2ms 76.4MB 360ms 7ms pypy 3.10.12
python 1.py 1202ms 7.3ms 8.4MB 1190ms 0ms pyston 3.8.12
python 2.py 1603ms 2.5ms 7.9MB 1590ms 0ms pyston 3.8.12
python 1.py 3302ms 19ms 8.4MB 3287ms 0ms cpython 3.11.4
python 2.py 3358ms 33ms 8.6MB 3343ms 0ms cpython 3.11.4

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 441ms 3.7ms 206.9MB 367ms 60ms julia/aot 1.9.2
python 1.py 3962ms 23ms 388.8MB 3823ms 117ms pypy 3.10.12
python 2.py 4945ms 31ms 633.0MB 4633ms 293ms pyston 3.8.12
python 1.py timeout 0.0ms 321.1MB 4937ms 50ms cpython 3.11.4
python 2.py timeout 0.0ms 633.6MB 4703ms 277ms cpython 3.11.4
python 2.py timeout 0.0ms 1013.9MB 4687ms 287ms pypy 3.10.12
python 1.py timeout 0.0ms 320.5MB 4910ms 73ms pyston 3.8.12

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 236ms 5.2ms 200.7MB 150ms 70ms julia/aot 1.9.2
python 1.py 883ms 15ms 213.0MB 840ms 30ms pypy 3.10.12
python 2.py 1136ms 6.5ms 164.4MB 1070ms 50ms pyston 3.8.12
python 2.py 1412ms 11ms 266.7MB 1277ms 117ms pypy 3.10.12
python 1.py 1677ms 20ms 86.1MB 1640ms 23ms pyston 3.8.12
python 2.py 1697ms 29ms 164.8MB 1647ms 37ms cpython 3.11.4
python 1.py 2679ms 11ms 86.8MB 2640ms 20ms cpython 3.11.4