github bluuewhale/hash-smith v0.2.0

11 hours ago

What's Changed

  • feat: benchmark infrastructure — per-structure tasks, fast mode, JSON persistence, regression compare by @bluuewhale in #14
  • perf(SwissMap): exp-001 optimization — 13–33% improvement across all benchmarks by @bluuewhale in #15

Detailed Change Logs

Added

  • Benchmark infrastructure (#14): Added per-structure Gradle tasks (jmhSwissMap, jmhConcurrent, jmhSimd) and jmhFast mode (reduced fork/warmup/iteration counts for quick iteration). Results are now auto-written to timestamped JSON files under benchmark-results/. Added jmhCompare task backed by scripts/jmh_compare.py to detect performance regressions between two result files (exits non-zero on regression above threshold).

Improved

  • SwissMap hot-path performance (#15): exp-001 optimization experiment applied to findIndexHashed and putValHashed — 13–33% improvement across all key benchmarks with no regressions.

    Metric Baseline Optimized Δ
    GetHit @ 12K 5.59 ns 4.53 ns −18.9%
    GetHit @ 784K 17.98 ns 14.95 ns −16.8%
    GetMiss @ 12K 5.84 ns 4.80 ns −17.8%
    GetMiss @ 784K 16.51 ns 14.28 ns −13.5%
    PutHit @ 12K 8.09 ns 6.48 ns −19.9%
    PutHit @ 784K 30.59 ns 23.34 ns −23.7%
    PutMiss @ 12K 23.70 ns 15.98 ns −32.6%
    PutMiss @ 784K 109.84 ns 83.79 ns −23.7%

    Techniques applied: ILP hoisting of SWAR eqMask/emptyMask operations, SWAR match shortcut (skip emptyMask on hit path), lazy emptyMask in putValHashed tombstone update path.

Changed

  • README example code simplified (removed SwissSimdMap references).

Full Changelog: v0.1.8...v0.2.0

Don't miss a new hash-smith release

NewReleases is sending notifications on new releases.