Zig VS Acton benchmarks

Current benchmark data was generated on Fri Dec 09 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 2227ms 30ms 49.1MB 2190ms 20ms zig 0.11.0-dev.632+d69e97ae1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 190ms 1.1ms 7.1MB 173ms 0ms zig 0.11.0-dev.632+d69e97ae1

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
acton 1.act 548ms 11ms 7.4MB 487ms 43ms actonc 0.14.2
zig 1.zig 4853ms 2.9ms 2.6MB 4820ms 13ms zig 0.11.0-dev.632+d69e97ae1

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
acton 1.act 202ms 1.2ms 5.3MB 183ms 3ms actonc 0.14.2
zig 1.zig 802ms 4.1ms 1.9MB 780ms 7ms zig 0.11.0-dev.632+d69e97ae1

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2-m.zig 1159ms 1.1ms 0.9MB 2267ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 3-i.zig 1436ms 0.9ms 1.0MB 1423ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 2.zig 2426ms 0.5ms 1.0MB 2413ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 3321ms 5.0ms 1.0MB 3307ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2-m.zig 110ms 0.3ms 1.0MB 190ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 3-i.zig 122ms 0.3ms 1.0MB 110ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 2.zig 210ms 5.2ms 1.0MB 200ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 273ms 3.5ms 1.0MB 260ms 0ms zig 0.11.0-dev.632+d69e97ae1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 139ms 0.2ms 1.0MB 130ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 17ms 1.7ms 1.0MB 10ms 0ms zig 0.11.0-dev.632+d69e97ae1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 1.9ms 0.8ms 1.0MB 0ms 0ms zig 0.11.0-dev.632+d69e97ae1
acton 1.act 5.2ms 3.9ms 3.1MB 0ms 0ms actonc 0.14.2

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 125ms 1.2ms 14.4MB 110ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 712ms 1.9ms 75.0MB 663ms 30ms zig 0.11.0-dev.632+d69e97ae1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 1129ms 6.6ms 24.7MB 1093ms 20ms zig 0.11.0-dev.632+d69e97ae1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 125ms 0.8ms 7.6MB 110ms 3ms zig 0.11.0-dev.632+d69e97ae1

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 47ms 0.1ms 2.8MB 40ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 135ms 0.7ms 2.8MB 120ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 22ms 0.1ms 1.0MB 10ms 0ms zig 0.11.0-dev.632+d69e97ae1

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 370ms 0.4ms 4.2MB 360ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 18ms 0.2ms 1.0MB 10ms 0ms zig 0.11.0-dev.632+d69e97ae1

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 1100ms 2.8ms 41.1MB 1070ms 13ms zig 0.11.0-dev.632+d69e97ae1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 223ms 2.0ms 11.0MB 203ms 0ms zig 0.11.0-dev.632+d69e97ae1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2.zig 255ms 1.0ms 1.0MB 240ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 377ms 0.2ms 1.0MB 370ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2.zig 27ms 0.2ms 1.1MB 20ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 41ms 1.5ms 1.1MB 30ms 0ms zig 0.11.0-dev.632+d69e97ae1

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2.zig 372ms 1.4ms 6.1MB 360ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 753ms 11ms 40.2MB 730ms 7ms zig 0.11.0-dev.632+d69e97ae1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2.zig 79ms 0.3ms 2.2MB 70ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 113ms 1.5ms 11.0MB 100ms 0ms zig 0.11.0-dev.632+d69e97ae1

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 2003ms 0.4ms 2.3MB 1983ms 3ms zig 0.11.0-dev.632+d69e97ae1
acton 1.act 4902ms 85ms 7.8MB 4477ms 777ms actonc 0.14.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 1.zig 459ms 0.2ms 1.8MB 447ms 0ms zig 0.11.0-dev.632+d69e97ae1
acton 1.act 1475ms 7.3ms 6.4MB 1327ms 277ms actonc 0.14.2

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2-m.zig 890ms 0.4ms 1.3MB 1713ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 2.zig 1717ms 0.5ms 1.1MB 1707ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 3873ms 77ms 1.0MB 3863ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2-m.zig 233ms 0.6ms 1.2MB 423ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 2.zig 432ms 1.3ms 1.0MB 420ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 967ms 0.9ms 1.1MB 957ms 0ms zig 0.11.0-dev.632+d69e97ae1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
zig 2-m.zig 64ms 2.1ms 1.2MB 100ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 2.zig 111ms 1.0ms 1.1MB 100ms 0ms zig 0.11.0-dev.632+d69e97ae1
zig 1.zig 245ms 1.0ms 1.1MB 237ms 0ms zig 0.11.0-dev.632+d69e97ae1