Skip to content

bench: add comparison suite against dashmap and moka - #42

Merged
SF-Zhou merged 1 commit into
mainfrom
dev
Jul 16, 2026
Merged

bench: add comparison suite against dashmap and moka#42
SF-Zhou merged 1 commit into
mainfrom
dev

Conversation

@SF-Zhou

@SF-Zhou SF-Zhou commented Jul 16, 2026

Copy link
Copy Markdown
Owner
  • Add benches/bench_compare.rs with four groups at 1/4/8 threads: concurrent get (all hits), mixed 90% get / 10% insert, hot-key exclusive entry access (lockmap vs dashmap), and LRU mixed workload under eviction pressure (LruLockMap vs moka)
  • Normalize semantics across crates and document fairness notes in the file header (guard-based get copies the value out; moka excluded from the entry group, dashmap from the eviction group)
  • Add dashmap 6 and moka 0.12 as dev-dependencies only
  • README: add a Benchmarks section with qualitative guidance; no absolute numbers published (to be measured on dedicated hardware)

- Add benches/bench_compare.rs with four groups at 1/4/8 threads:
  concurrent get (all hits), mixed 90% get / 10% insert, hot-key
  exclusive entry access (lockmap vs dashmap), and LRU mixed workload
  under eviction pressure (LruLockMap vs moka)
- Normalize semantics across crates and document fairness notes in the
  file header (guard-based get copies the value out; moka excluded from
  the entry group, dashmap from the eviction group)
- Add dashmap 6 and moka 0.12 as dev-dependencies only
- README: add a Benchmarks section with qualitative guidance; no
  absolute numbers published (to be measured on dedicated hardware)
Copilot AI review requested due to automatic review settings July 16, 2026 03:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Criterion benchmark suite to compare lockmap performance against popular alternatives (dashmap and moka), and documents how to run/interpret these benchmarks.

Changes:

  • Introduce benches/bench_compare.rs with multiple multi-threaded workload groups and explicit “fairness notes” to align differing crate semantics.
  • Add dashmap and moka as dev-dependencies and register a new bench_compare benchmark target.
  • Document benchmark usage and guidance in README.md, and note the addition in CHANGELOG.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
README.md Adds a Benchmarks section with run commands and interpretation guidance.
CHANGELOG.md Notes the addition of the comparison benchmark suite.
Cargo.toml Adds dashmap and moka as dev-dependencies and registers the bench_compare bench target.
benches/bench_compare.rs Implements the new comparison benchmark suite with normalized semantics across crates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SF-Zhou
SF-Zhou merged commit ad23b33 into main Jul 16, 2026
11 of 14 checks passed
@SF-Zhou
SF-Zhou deleted the dev branch July 16, 2026 03:50
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.29%. Comparing base (a022f47) to head (aa13a4b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files           3        3           
  Lines        2272     2272           
=======================================
  Hits         2256     2256           
  Misses         16       16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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