All Zig benchmarks

Current benchmark data was generated on Fri Jul 01 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8171M 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.)

binarytrees

Input: 18

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig timeout 0.0ms 0.0MB 0ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 4356ms 30ms 8.0MB 3317ms 1000ms zig 0.10.0-dev.2820+48fd92365

edigits

Input: 250001

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig timeout 0.0ms 0.0MB 0ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 100000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 1108ms 4.6ms 0.5MB 990ms 97ms zig 0.10.0-dev.2820+48fd92365

fannkuch-redux

Input: 11

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-m.zig 1381ms 12ms 0.0MB 2657ms 3ms zig 0.10.0-dev.2820+48fd92365
2.zig 2899ms 12ms 0.0MB 2887ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 3986ms 21ms 0.1MB 3970ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-m.zig 132ms 1.4ms 0.0MB 223ms 0ms zig 0.10.0-dev.2820+48fd92365
2.zig 249ms 1.5ms 0.0MB 240ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 332ms 4.1ms 0.1MB 320ms 0ms zig 0.10.0-dev.2820+48fd92365

fasta

Input: 2500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 166ms 0.5ms 0.0MB 150ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 250000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 20ms 1.3ms 0.0MB 10ms 0ms zig 0.10.0-dev.2820+48fd92365

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 1.2ms 0.3ms 0.0MB 0ms 0ms zig 0.10.0-dev.2820+48fd92365

lru

Input: 1000 1000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 64ms 1.7ms 1.6MB 53ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 1000 3000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 188ms 8.9ms 1.6MB 177ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 100 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 29ms 1.1ms 0.0MB 20ms 0ms zig 0.10.0-dev.2820+48fd92365

mandelbrot

Input: 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 461ms 9.2ms 3.1MB 450ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 27ms 5.7ms 0.0MB 13ms 0ms zig 0.10.0-dev.2820+48fd92365

merkletrees

Input: 17

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig timeout 0.0ms 0.0MB 0ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig timeout 0.0ms 0.0MB 0ms 0ms zig 0.10.0-dev.2820+48fd92365

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.zig 321ms 15ms 0.0MB 310ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 469ms 4.9ms 0.0MB 457ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.zig 34ms 1.8ms 0.0MB 20ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 49ms 0.5ms 0.0MB 40ms 0ms zig 0.10.0-dev.2820+48fd92365

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.zig 473ms 13ms 4.9MB 460ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 1177ms 12ms 39.1MB 1137ms 23ms zig 0.10.0-dev.2820+48fd92365

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.zig 97ms 0.4ms 1.1MB 90ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 131ms 4.3ms 9.6MB 117ms 0ms zig 0.10.0-dev.2820+48fd92365

pidigits

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig timeout 0.0ms 0.0MB 0ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.zig 3846ms 9.0ms 0.4MB 1423ms 2400ms zig 0.10.0-dev.2820+48fd92365

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-m.zig 1107ms 6.8ms 0.3MB 2103ms 7ms zig 0.10.0-dev.2820+48fd92365
2.zig 2120ms 9.1ms 0.0MB 2107ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 4703ms 44ms 0.1MB 4690ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-m.zig 292ms 2.8ms 0.2MB 523ms 0ms zig 0.10.0-dev.2820+48fd92365
2.zig 525ms 2.2ms 0.0MB 510ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 1183ms 4.8ms 0.2MB 1173ms 0ms zig 0.10.0-dev.2820+48fd92365

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2-m.zig 86ms 4.3ms 0.2MB 127ms 0ms zig 0.10.0-dev.2820+48fd92365
2.zig 134ms 0.6ms 0.0MB 123ms 0ms zig 0.10.0-dev.2820+48fd92365
1.zig 302ms 7.4ms 0.1MB 290ms 0ms zig 0.10.0-dev.2820+48fd92365