Skip to content

perf: compare cached path hash before path#205

Draft
hardfist wants to merge 2 commits into
mainfrom
perf/cached-path-eq-hash
Draft

perf: compare cached path hash before path#205
hardfist wants to merge 2 commits into
mainfrom
perf/cached-path-eq-hash

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented May 9, 2026

Summary

  • Compare CachedPath memoized hashes before falling back to path equality.
  • Compare dyn CacheKey memoized hashes before falling back to path equality, covering borrowed cache lookup paths like DashSet::get((hash, path).borrow()).
  • Keep path comparison as the collision guard.

Test

  • rustfmt --edition 2021 src/cache.rs
  • cargo test --no-run using installed nightly-aarch64-apple-darwin because local pinned nightly-2025-11-10 is incomplete
  • cargo test tests::simple::simple
  • Full cargo test was not rerun for this follow-up; previous full run failed in existing PnP fixture resolution cases with NotFound(...) errors

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 9, 2026

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing perf/cached-path-eq-hash (fa0ba02) with main (31610e6)

Open in CodSpeed

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