Commit 01a3080
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 01a3080
3 files changed
Lines changed: 124 additions & 80 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
0 commit comments