Git 2.26's Faster Searches Thanks To Multi-Threaded Git-Grep
With the Git 2.26 release at the end of March one of the performance wins comes in the way of Git's grep functionality now being multi-threaded.
Besides multi-threaded git-grep being faster, another interesting anecdote is that it was created by a student developer during last year's Google Summer of Code. Student developer Matheus Tavares wrote a blog post this week about this faster pattern searching in Git 2.26 following his GSoC project in 2019. Git's grep functionality had seen multi-threading work originally in 2010 but Git's internal object store up until now made it perform worse than the sequential grep.
In the end he was able to improve the git-grep performance by over three times on a 4-core / 8-thread system. "In the cached searches, we observed speedups of up to 3.34x over the original code, and almost 5x over the original code with threads re-enabled but without the improvements. Additionally, the working tree searches also got faster with our changes, showing speedups of up to 1.53x."
More details on this multi-threaded win for Git via this blog post. We have also added the git-grep query used for the benchmarks in the research to our Git benchmark.
Besides multi-threaded git-grep being faster, another interesting anecdote is that it was created by a student developer during last year's Google Summer of Code. Student developer Matheus Tavares wrote a blog post this week about this faster pattern searching in Git 2.26 following his GSoC project in 2019. Git's grep functionality had seen multi-threading work originally in 2010 but Git's internal object store up until now made it perform worse than the sequential grep.
In the end he was able to improve the git-grep performance by over three times on a 4-core / 8-thread system. "In the cached searches, we observed speedups of up to 3.34x over the original code, and almost 5x over the original code with threads re-enabled but without the improvements. Additionally, the working tree searches also got faster with our changes, showing speedups of up to 1.53x."
More details on this multi-threaded win for Git via this blog post. We have also added the git-grep query used for the benchmarks in the research to our Git benchmark.
2 Comments