Elixir VS Python benchmarks

Current benchmark data was generated on Wed May 25 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (Model 85)

* -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.)

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1538ms 8.5ms 221.3MB 1423ms 100ms pypy 3.8.13
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 312ms 8.1ms 90.4MB 270ms 23ms pypy 3.8.13
elixir 1.ex 520ms 11ms 48.2MB 520ms 67ms elixir 12.3.2
python 1.py 864ms 4.1ms 17.2MB 843ms 0ms pyston 3.8.12
python 1.py 910ms 2.7ms 17.0MB 887ms 7ms cpython 3.10.4

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 753ms 3.4ms 82.9MB 707ms 27ms pypy 3.8.13
python 1.py 2245ms 159ms 9.3MB 2230ms 0ms cpython 3.10.4
python 1.py 2294ms 0.4ms 10.0MB 2283ms 0ms pyston 3.8.12
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 199ms 12ms 76.2MB 163ms 17ms pypy 3.8.13
python 1.py 404ms 0.7ms 9.1MB 390ms 0ms pyston 3.8.12
python 1.py 419ms 0.5ms 8.5MB 407ms 0ms cpython 3.10.4
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 14ms 1.8ms 7.6MB 10ms 0ms pyston 3.8.12
python 1.py 16ms 2.8ms 7.3MB 10ms 0ms cpython 3.10.4
python 1.py 37ms 1.1ms 54.6MB 12ms 10ms pypy 3.8.13
elixir 1.ex 225ms 3.7ms 49.0MB 226ms 44ms elixir 12.3.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 4.py 2069ms 2.9ms 8.6MB 2037ms 20ms cpython 3.10.4
python 4.py 2237ms 2.1ms 9.4MB 2207ms 10ms pyston 3.8.12
python 4.py 2733ms 28ms 127.6MB 2640ms 73ms pypy 3.8.13
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 4.py 502ms 4.7ms 8.4MB 480ms 0ms cpython 3.10.4
python 4.py 535ms 1.2ms 9.1MB 520ms 0ms pyston 3.8.12
python 4.py 702ms 4.2ms 79.7MB 670ms 20ms pypy 3.8.13
elixir 1.ex 1181ms 4.3ms 48.1MB 1160ms 153ms elixir 12.3.2

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 8-m.py 4206ms 35ms 105.3MB 7317ms 397ms pypy 3.8.13
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12