Skip to content

perf(gix-hash): upgrade sha1dc to 0.1.2 - #3012

Merged
Sebastian Thiel (Byron) merged 1 commit into
GitoxideLabs:mainfrom
srijs:sha1dc-0.1.2
Sep 23, 2026
Merged

Sebastian Thiel (Byron) merged 1 commit into
GitoxideLabs:mainfrom
srijs:sha1dc-0.1.2

Conversation

@srijs

Copy link
Copy Markdown
Contributor

sha1dc 0.1.2 speeds up the collision check: recompression now uses the SHA-1 hardware instructions where available, and the filter for known disturbance vectors got cheaper. The minimum version is raised so dependents of gix-hash pick it up too.

Performance: On an Apple M4 (4P/6E), against a bare clone of git/git: 421,363 objects, 305 MiB pack. Built from the tree of #3008 with the max-pure feature set and one target directory, with only the SHA-1 backend toggled; fastest of 5 rounds, rotating between builds each round.

operation sha1-checked sha1dc 0.1.1 sha1dc 0.1.2 vs 0.1.1
gix free pack verify (1 thread) 12.85s 6.11s 5.65s 1.08x
gix free pack index create (1 thread) 14.69s 7.77s 7.30s 1.06x
gix free pack verify (all cores) 2.28s 1.06s 1.03s 1.03x
gix free pack index create (all cores) 4.28s 2.80s 2.69s 1.04x

The all-cores runs were noisy on this machine, and their medians are on par between 0.1.1 and 0.1.2; the single-threaded gains are consistent across rounds.

sha1dc 0.1.2 speeds up the collision check: recompression now uses the
SHA-1 hardware instructions where available, and the filter for known
disturbance vectors got cheaper. The minimum version is raised so
dependents of `gix-hash` pick it up too.

Performance: On an Apple M4 (4P/6E), against a bare clone of `git/git`:
421,363 objects, 305 MiB pack. Built from the tree of GitoxideLabs#3008 with the
`max-pure` feature set and one target directory, with only the SHA-1
backend toggled; fastest of 5 rounds, rotating between builds each round.

| operation | `sha1-checked` | `sha1dc` 0.1.1 | `sha1dc` 0.1.2 | vs 0.1.1 |
|---|---:|---:|---:|---:|
| `gix free pack verify` (1 thread) | 12.85s | 6.11s | 5.65s | **1.08x** |
| `gix free pack index create` (1 thread) | 14.69s | 7.77s | 7.30s | **1.06x** |
| `gix free pack verify` (all cores) | 2.28s | 1.06s | 1.03s | 1.03x |
| `gix free pack index create` (all cores) | 4.28s | 2.80s | 2.69s | 1.04x |

The all-cores runs were noisy on this machine, and their medians are on
par between 0.1.1 and 0.1.2; the single-threaded gains are consistent
across rounds.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@Byron Sebastian Thiel (Byron) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it Christmas already?
Thanks so much!

@Byron
Sebastian Thiel (Byron) merged commit 793befb into GitoxideLabs:main Sep 23, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants