Skip to content

Bulk-copy long RAR 2.0 matches - #101

Merged
bitplane merged 1 commit into
masterfrom
perf/rar20-bulk-match-copy
Oct 25, 2026
Merged

bitplane merged 1 commit into
masterfrom
perf/rar20-bulk-match-copy

Conversation

@bitplane

Copy link
Copy Markdown
Owner

RAR 2.0 decoded every match one byte at a time, including long repetitions. Bulk-copy matches longer than 64 bytes when no workspace quota is active, extending overlapping patterns in successively larger runs. Keep the original scalar loop for short matches and quota-limited readers so their growth order and allocation-failure prefixes stay unchanged.

Preserve zero-distance normalization, whole-match zero filling before the window, pending matches across member boundaries, cloning, and trimmed solid history. Add comparisons against the original byte loop, including every allocation refusal and workspace limits, plus an encoded streaming/solid regression test.

Synthetic public-decoder measurements on two 256 KiB repetitive fixtures show roughly 6× and 9× faster decoding. Short-match-heavy and literal-only controls stay within a few percent of baseline in repeated measurements, with occasional noisy outliers. These are codec measurements, not general archive-extraction speedups; quota-limited readers retain the scalar path.

Validation:

  • Release package tests, including integration and doc tests: 2,605 passed; 17 existing ignored.
  • Minimal-feature library tests: 347 passed.
  • Formatting and all-target Clippy with warnings denied, with default and minimal features.
  • Independent claude -p plan and final reviews: approved, no blocking findings.

@bitplane
bitplane merged commit 12dc147 into master Oct 25, 2026
24 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