Elixir VS Go benchmarks

Current benchmark data was generated on Thu Sep 22 2022, 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.)

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 787ms 149ms 13.6MB 1523ms 3ms go 1.19.1
go 1.go 1694ms 7.1ms 257.2MB 1627ms 53ms tinygo 0.25.0
elixir 1.ex 4743ms 26ms 53.5MB 4777ms 117ms elixir 13.1.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 57ms 8.6ms 5.4MB 87ms 0ms go 1.19.1
go 1.go 272ms 0.3ms 68.7MB 247ms 10ms tinygo 0.25.0
elixir 1.ex 509ms 4.1ms 50.6MB 543ms 43ms elixir 13.1.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 168ms 2.7ms 8.5MB 157ms 0ms go 1.19.1
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 13.1.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 49ms 1.8ms 8.2MB 37ms 0ms go 1.19.1
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 13.1.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 1.6ms 0.9ms 0.0MB 0ms 0ms tinygo 0.25.0
go 1.go 2.6ms 0.5ms 2.9MB 0ms 0ms go 1.19.1
elixir 1.ex 216ms 4.1ms 47.8MB 240ms 34ms elixir 13.1.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 8.go 1424ms 4.4ms 8.5MB 1400ms 7ms go 1.19.1
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 13.1.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 8.go 341ms 0.8ms 8.4MB 323ms 3ms go 1.19.1
elixir 1.ex 1308ms 3.9ms 46.6MB 1347ms 133ms elixir 13.1.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 2511ms 29ms 5.4MB 4843ms 7ms go 1.19.1
go 1.go 4887ms 5.0ms 5.5MB 4870ms 3ms go 1.19.1
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 13.1.0
go 1.go timeout 0.0ms 0.0MB 0ms 0ms tinygo 0.25.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 630ms 0.5ms 4.9MB 1200ms 0ms go 1.19.1
go 1.go 1229ms 3.9ms 2.9MB 1213ms 3ms go 1.19.1
go 1.go 2577ms 1.0ms 0.0MB 2560ms 0ms tinygo 0.25.0
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 13.1.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 166ms 0.9ms 4.9MB 293ms 0ms go 1.19.1
go 1.go 309ms 0.2ms 2.9MB 300ms 0ms go 1.19.1
go 1.go 648ms 0.7ms 0.0MB 637ms 0ms tinygo 0.25.0
elixir 1.ex timeout 0.0ms 0.0MB 0ms 0ms elixir 13.1.0