Skip to content

v1.0.0

Choose a tag to compare

@bep bep released this 01 Aug 15:19
· 4 commits to master since this release

We understand that the users of a hashing library would appreciate a v1 release, so here it is. Some bug fixes and features (see below), but also some noticeable performance gains (some great help from pprof, no AI involved ...):

Benchmark time/op Δ B/op Δ allocs/op Δ
Map/default 2.25µ → 1.92µ −15% 632 → 64 −90% 39 → 4 −90%
Map/no-op unwrap 2.34µ → 2.00µ −14% 624 → 64 −90% 38 → 4 −89%
Struct/value 180n → 165n −8% 112 → 16 −86% 5 → 1 −80%
Struct/pointer 158n → 144n −9% 96 → 0 −100% 4 → 0 −100%
Struct/pointer predefined hasher 152n → 135n −11% 88 → 0 −100% 3 → 0 −100%
String/default 28.8n → 37.9n +32% 8 → 0 −100% 1 → 0 −100%
String/xxhash 16.5n → 13.0n −22% 0 → 0 = 0 → 0 =
geomean 195n → 180n −8%

And now, comparing this fork to the original in mitchellh/hashstructure:

Benchmark time/op Δ B/op Δ allocs/op Δ
Map/default 2.96µ → 1.96µ −34% 1630 → 64 −96% 101 → 4 −96%
Struct/value 278n → 169n −39% 160 → 16 −90% 11 → 1 −91%
Struct/pointer 277n → 147n −47% 160 → 0 −100% 11 → 0 −100%
Struct/pointer predefined hasher 269n → 138n −49% 152 → 0 −100% 10 → 0 −100%
String/default 58.2n → 38.7n −33% 40 → 0 −100% 2 → 0 −100%
String/xxhash 32.9n → 13.3n −60% 32 → 0 −100% 1 → 0 −100%
geomean 221n → 184n −44%

What's Changed

  • cleanup format info from comments by @shorsher in #11
  • Update Go 1.25.x/1.26.x, GitHub Actions, go.mod Go 1.25, dependencies by @bep in #17
  • all: Run modernize -fix ./... by @bep in #19
  • Add UnwrapFunc option by @bep in #21
  • Fix hash collisions for sets containing duplicate elements by @bep in #22
  • Misc performance improvements by @bep in #24
  • Improve README.md by @bep in #26

New Contributors

Full Changelog: v0.6.0...v1.0.0