Skip to content

perf(xor): reduce peak construction memory - #316

Merged
tisonkun merged 2 commits into
apache:mainfrom
tisonkun:codex/xor-followup
Oct 30, 2026
Merged

tisonkun merged 2 commits into
apache:mainfrom
tisonkun:codex/xor-followup

Conversation

@tisonkun

@tisonkun tisonkun commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

XOR construction retained its graph buffers while allocating the final fingerprint payload. Release the graph after peeling succeeds, when assignment only needs the peel stack.

For eight million distinct synthetic hashes with base seed 1, measured peak live heap allocation changes as follows:

Fingerprint width Before After Reduction
8 bits 263.3 MB 253.4 MB 3.7%
16 bits 273.1 MB 253.4 MB 7.2%
32 bits 292.8 MB 253.4 MB 13.4%

Measurements use allocation tracking on arm64 macOS and exclude the preexisting input and allocator overhead; they are not process RSS. A separate 16,384-key case exercises retry cleanup at all three widths.

Validation: cargo x check, cargo x test, cargo x lint, and targeted MSRV 1.86 tests.

@tisonkun tisonkun changed the title perf(xor): reduce peak construction memory and verify Java interoperability perf(xor): reduce peak construction memory Oct 30, 2026
@tisonkun
tisonkun enabled auto-merge (squash) October 30, 2026 09:28
@tisonkun
tisonkun merged commit bb6ba57 into apache:main Oct 30, 2026
10 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.

1 participant