Add zig implementation - #100
michaelortmann wants to merge 7 commits into
Conversation
|
threaded zig 1:00.70: verify: |
|
Thank you, this looks interesting. We might have a new version of this repo on the way: #97 |
|
Meanwhile rust 1.81.0 got a faster sort implementation (https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#new-sort-implementations), 25% faster in this test, wow!, and zig also got faster. C optimized from #93 is fastest, using only half the memory and doing only 1 voluntary context switch. New benchmarks: threaded zig 0:58.24: zig 1:02.59: rust 1:24.05: verify: versions: |
|
Faster less than string compare. New benchmarks: zig 0:57.28: |
|
Tune StringHashMap capacity to avoid resize / rehash. Threaded version is faster than C optimized. New benchmarks: zig 0:55.88: verify: |
|
Removed buffered reader overhead and tuned stdin read initial buffer size to avoid resize / rehash. Also uses 7% less memory in this benchmark. New benchmarks: threaded zig 0:47.80: zig 0:52.72: verify: |
|
Removed a layer of indirection. Unthreaded version also is faster than C optimized. By 12%. New benchmarks: threaded zig 0:40.52: zig 0:44.33: verify: |
i know that this repo is no longer maintained, so i dont expect this PR to be merged. This is the first zig code I ever wrote, so although it is the fastest in my benchmark, please bear with me.
zig 1:06.52:
java 1:07.34:
c++ 1:49.37:
rust 1:53.38:
verify:
so, the java implementation has a bug
versions: