gix-blame performance improved by a change in gix-diff
In February 2026, we got a PR in gitoxide that substantially
improved gix-diff’s tree diff performance. Since gix-blame’s algorithm uses
a lot of tree diffs under the hood, I wanted to know what the impact on
gix-blame’s performance was.
I set up a benchmark using hyperfine in this script and,
with the help of seaborn, plotted the results using another
script. And the results are quite impressive: speedups of up
to 25 % in some scenarios, with no noticeable performance degradation in any
scenario.
Update 2026-03-14: I’ve changed the plots to use shades of blue instead of
variants of magenta and green.
Plots
Catplot of running 2 versions of
gix-blame on a set of files
Boxplot of running 2 versions of
gix-blame on a set of files
Details for individual benchmark runs
The commands have been shortened. The commit hash is short for a version of
gitoxide compiled from that commit. e63d487fb is the commit containing the
optimization, 29040a827 is its parent. All runs were regular gix blame …
runs.