The author was examining the Zig programming language and came across a slow implementation of HashMap. They compared it to the Factor programming language and found that Factor’s implementation was faster. They ran a test case in both languages and recorded the time each block of actions took. Zig’s HashMap implementation was significantly slower over time. The author discovered that the issue was with Zig’s use of tombstone buckets, which caused fragmentation and slowed down the HashMap. They proposed an in-place rehashing method to improve performance, which reduced the time per block in Zig.
https://re.factorcode.org/2023/11/factor-is-faster-than-zig.html