Commit 3f82fb1
committed
perf(ccusage): avoid Rust dedupe key allocations
Replace per-entry messageId/requestId string concatenation with a hashed lookup and collision-safe string comparison. This keeps duplicate replacement semantics unchanged while avoiding allocation of a combined key for every usage entry during global deduplication.
Also rename the Rust color helper from colour/Colour to color/Color so the existing spell-check workflow passes on this branch.
The rejected alternatives were opt-level=s, which increased binary size from 757024 to 854416 bytes without a speed win, and a manual JSON fast path, which slowed daily runs. Baseline/current JSON output matched for daily, session, and blocks.1 parent 532267c commit 3f82fb1
2 files changed
Lines changed: 123 additions & 80 deletions
0 commit comments