ffi-overhead
ffi-overhead copied to clipboard
Update to latest zig
The version of zig listed in the readme is 3-ish years old
I was curious what the numbers look like now so I updated it
./a.out is the the c implementation compiled with clang hello.c newplus/plus.c --std=c17 -O2 on macOS
❯ hyperfine "./zig_hello/zig_hello 500000000" "./a.out 500000000"
Benchmark #1: ./zig_hello/zig_hello 500000000
Time (mean ± σ): 446.2 ms ± 6.8 ms [User: 443.6 ms, System: 0.9 ms]
Range (min … max): 437.8 ms … 458.9 ms 10 runs
Benchmark #2: ./a.out 500000000
Time (mean ± σ): 447.5 ms ± 5.5 ms [User: 445.0 ms, System: 0.8 ms]
Range (min … max): 440.4 ms … 456.8 ms 10 runs
Summary
'./zig_hello/zig_hello 500000000' ran
1.00 ± 0.02 times faster than './a.out 500000000'