TLDR Tech / Dev
Don't stop early: Case-folding source code at memory speed
Case folding is an operation in text processing that makes sure strings differing only in case are treated as equal, but achieving this quickly at scale is a challenge. GitHub's code search engine, Blackbird, efficiently implements case folding by using a branch-free loop and byte-space arithmetic, enabling it to process ASCII characters at speeds exceeding 45 GiB/s on a single core.
Read the full story