DigiNews

Tech Watch by Johan Denoyer

← Back to articles

11 nanoseconds per word: Ridiculously Over-Optimizing Anagrams

Quality: 8/10 Relevance: 9/10

Summary

Technical exploration of optimizing an anagram solver for a word-ladder game in Rust. The author demonstrates multiple approaches to identifying anagrams efficiently—sorting-based keys, 4-bit packed letter counts in a u128, 64-bit Gödel-numbering with prime products, and a packed 5-bit representation—with benchmark results showing dramatic improvements from 31 ms baseline to around 1.96 ms. The post also discusses memory allocations, hash table choices, and ILP-friendly optimizations.

🚀 Service construit par Johan Denoyer