TLDR Tech / DevOps
Don't Stop Early: Case-Folding Source Code at Memory Speed (16 minute read)
GitHub accelerated case-folding in its code search engine from roughly 3 GiB/s to more than 45 GiB/s by removing an early-exit branch and using branch-free byte arithmetic that LLVM could fully vectorize. A compact Unicode lookup structure and allocation-free ASCII path keep the common case near memory-bandwidth limits, showing that two clean passes can outperform a seemingly efficient branchy single pass.
Read the full story