Skip to content

Add zero-dependency parallel redaction for large inputs - #3

Merged
ptukovar merged 1 commit into
ptukovar:mainfrom
DBinK:feat/parallel-redaction
Jul 28, 2026
Merged

Add zero-dependency parallel redaction for large inputs#3
ptukovar merged 1 commit into
ptukovar:mainfrom
DBinK:feat/parallel-redaction

Conversation

@DBinK

@DBinK DBinK commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an opt-in parallel feature with Redactor::find_parallel and Redactor::clean_parallel.
  • Use scoped standard library threads, leave one available CPU for other work, and keep inputs smaller than 256 KiB on the serial path.
  • Preserve zero dependencies, no_std + alloc support, detector priority, masking behavior, and panic propagation.
  • Use BTreeMap for overlap resolution to avoid quadratic insertion costs on match-dense inputs.
  • Add serial and parallel equivalence tests, a dense-match complexity guard, documentation, and a dependency-free benchmark comparison.

Performance

Command: cargo run --release --all-features --example bench

Synthetic 1,420,090-byte input on the development machine:

  • Serial: 16.4 MiB/s
  • Parallel: 52.0 MiB/s
  • Speedup: 3.17x

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-features
  • cargo build --no-default-features
  • cargo doc --no-deps
  • cargo test --release --test complexity -- --ignored --nocapture
  • cargo publish --dry-run --allow-dirty
  • CodeRabbit review: 0 findings after the final review

Notes

The local Rust 1.70.0 toolchain download failed during the TLS handshake with static.rust-lang.org, so the MSRV-specific Clippy and test commands were not run locally. The pull request CI matrix covers Rust 1.70.0.

@ptukovar
ptukovar marked this pull request as ready for review July 28, 2026 19:14
@ptukovar
ptukovar merged commit 59fc0e9 into ptukovar:main Jul 28, 2026
5 checks passed
@ptukovar

Copy link
Copy Markdown
Owner

Thank you

@ptukovar ptukovar self-assigned this Aug 11, 2026
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