In this episode of Commit History, we’ll review a small (+75/-17) commit to the Zed open-source code editor, which resulted in a massive speed improvement for their “select-all-matches” feature - taking their example document benchmark from 1.04s to 4ms.
This is a fun commit to see how they changed the algorithm for selecting all matches in a text file to get this improvement, and how they did it by rewriting just a single function.
Links referenced:
Share this post