当時Zigに注目してなかったが、過去スレのこれ↓今度は「競プロ的視点」でZigのところ再現してくれ

ちなみに某一名が >それは専用プログラムでない限りプログラミングでやってはいけない行為 >"caller hash"
と批判しているが、"Rust@github rust/optimized-customhashmap"でも行われている。

https://github.com/benhoyt/countwords

https://mevius.5ch.net/test/read.cgi/tech/1655771266/
976デフォルトの名無しさん2022/08/05(金) 07:34:10.27ID:BZGh0CoX
Time in seconds for each data size: kjvbible.txt
x10 x100 x200 x400 Mem Comment

0.018 0.052 0.089 0.174 ***MB baseline/cat
0.036 0.089 0.147 0.260 ***MB baseline/rg foobar (ripgrep, no match)
0.032 0.091 0.159 0.290 ***MB baseline/ugrep foobar (no match)
0.058 0.457 0.889 1.789 1.1MB baseline/grep foobar (no match)
0.219 2.108 4.127 8.263 0.9MB baseline/wc -w (word count, total only)

0.154 1.271 2.551 5.079 2.0MB C (caller hash,stdin=binary-mode)
0.177 1.412 2.733 5.446 3.8MB Go (caller hash)
0.161 1.458 2.903 5.671 1.4MB C++ (caller hash,cin=binary-mode)
0.175 1.513 2.953 5.863 4.6MB Zig @github fixed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0.176 1.572 3.124 6.045 2.6MB Rust@github rust/optimized-customhashmap <------実は"caller hash"
0.180 1.597 3.219 6.267 3.1MB Rust@5ch res >>602
Ryzen9 5900X windows11