Elixir VS V 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
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang 0.2.4
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang+gc 0.2.4

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
elixir 1.ex 520ms 11ms 48.2MB 520ms 67ms elixir 12.3.2
v 1-m.v 1889ms 85ms 17.8MB 1903ms 1643ms v/clang 0.2.4
v 1-m.v 2361ms 540ms 20.5MB 2327ms 2083ms v/clang+gc 0.2.4

edigits

Input: 250001

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
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang+gc 0.2.4

Input: 100000

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
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang+gc 0.2.4

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 2.1ms 0.4ms 2.0MB 0ms 0ms v/clang+gc 0.2.4
v 1.v 2.5ms 2.4ms 0.6MB 0ms 0ms v/clang 0.2.4
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
v 1.v 4270ms 76ms 3.2MB 4247ms 3ms v/clang+gc 0.2.4
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2
v 1.v timeout 0.0ms 0.0MB 0ms 0ms v/clang 0.2.4
v 2.v timeout 0.0ms 0.0MB 0ms 0ms v/clang+gc 0.2.4

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 1076ms 1.6ms 2.5MB 1060ms 0ms v/clang+gc 0.2.4
elixir 1.ex 1181ms 4.3ms 48.1MB 1160ms 153ms elixir 12.3.2
v 2.v 1546ms 13ms 3.1MB 1530ms 0ms v/clang+gc 0.2.4
v 1.v 2390ms 6.9ms 2460.0MB 1277ms 1093ms v/clang 0.2.4

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 3033ms 0.4ms 2.9MB 3020ms 0ms v/clang+gc 0.2.4
v 1.v 3165ms 232ms 1.7MB 3153ms 0ms v/clang 0.2.4
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
v 1.v 762ms 0.3ms 2.6MB 750ms 0ms v/clang+gc 0.2.4
v 1.v 794ms 58ms 0.9MB 783ms 0ms v/clang 0.2.4
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
v 1.v 207ms 9.0ms 0.9MB 190ms 0ms v/clang 0.2.4
v 1.v 219ms 2.0ms 2.6MB 210ms 0ms v/clang+gc 0.2.4
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 12.3.2