Skip to content

Bump github.com/puzpuzpuz/xsync/v3 from 3.1.0 to 3.3.1#86

Merged
thushan merged 1 commit intomainfrom
dependabot/go_modules/github.com/puzpuzpuz/xsync/v3-3.3.1
Jul 12, 2024
Merged

Bump github.com/puzpuzpuz/xsync/v3 from 3.1.0 to 3.3.1#86
thushan merged 1 commit intomainfrom
dependabot/go_modules/github.com/puzpuzpuz/xsync/v3-3.3.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Jul 12, 2024

Bumps github.com/puzpuzpuz/xsync/v3 from 3.1.0 to 3.3.1.

Release notes

Sourced from github.com/puzpuzpuz/xsync/v3's releases.

v3.3.1

  • Add NewMapOfWithHasher function #137

Adds NewMapOfWithHasher function to support custom hash functions in MapOf:

m := NewMapOfWithHasher[int, int](https://github.com/puzpuzpuz/xsync/blob/HEAD/func(i int, _ uint64) uint64 {
	// Murmur3 finalizer. No DDOS protection as it does not support seed.
	h := uint64(i)
	h = (h ^ (h >> 33)) * 0xff51afd7ed558ccd
	h = (h ^ (h >> 33)) * 0xc4ceb9fe1a85ec53
	return h ^ (h >> 33)
})

Some custom hash functions may be faster than the built-in function if the lack of DDOS protection is fine.

Murmur3 finalizer:

BenchmarkMapOfInt_Murmur3Finalizer_WarmUp/reads=100%-8         	525864650	         2.240 ns/op	 446360938 ops/s	       0 B/op	       0 allocs/op
BenchmarkMapOfInt_Murmur3Finalizer_WarmUp/reads=99%-8          	383333918	         3.127 ns/op	 319827294 ops/s	       0 B/op	       0 allocs/op
BenchmarkMapOfInt_Murmur3Finalizer_WarmUp/reads=90%-8          	267635385	         4.535 ns/op	 220506863 ops/s	       0 B/op	       0 allocs/op
BenchmarkMapOfInt_Murmur3Finalizer_WarmUp/reads=75%-8          	181292007	         6.448 ns/op	 155092697 ops/s	       2 B/op	       0 allocs/op

Built-in hash function:

BenchmarkMapOfInt_WarmUp/reads=100%-8         	431097415	         2.858 ns/op	 349837551 ops/s	       0 B/op	       0 allocs/op
BenchmarkMapOfInt_WarmUp/reads=99%-8          	307244330	         3.951 ns/op	 253072903 ops/s	       0 B/op	       0 allocs/op
BenchmarkMapOfInt_WarmUp/reads=90%-8          	226392990	         5.306 ns/op	 188477583 ops/s	       0 B/op	       0 allocs/op
BenchmarkMapOfInt_WarmUp/reads=75%-8          	159236962	         7.513 ns/op	 133108546 ops/s	       2 B/op	       0 allocs/op

v3.3.0

  • Speed up MapOf lookups #134
  • Expose Map/MapOf statistics #133
  • Change license to Apache License 2.0 #135

Introduces meta memory and SWAR-based lookups similar to C++'s absl::flat_hash_map hash table (https://abseil.io/docs/cpp/guides/container). The lookups are now up to 30% faster.

Also, reduces MapOf's memory overhead: each bucket now holds up to 5 entries instead of 3.

Map/MapOf statistics are available via m.Stats(). They may be used for diagnostic purposes.

v3.2.0

  • Introduce Map/MapOf configs and grow-only option (#132)

Adds options support to the NewMap/NewMapOf functions. A MapOf can now be created like this:

m := xsync.NewMapOf[int, int](https://github.com/puzpuzpuz/xsync/blob/HEAD/WithPresize(100))

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/puzpuzpuz/xsync/v3](https://github.com/puzpuzpuz/xsync) from 3.1.0 to 3.3.1.
- [Release notes](https://github.com/puzpuzpuz/xsync/releases)
- [Commits](puzpuzpuz/xsync@v3.1.0...v3.3.1)

---
updated-dependencies:
- dependency-name: github.com/puzpuzpuz/xsync/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from thushan as a code owner July 12, 2024 16:45
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jul 12, 2024
@thushan thushan merged commit d092966 into main Jul 12, 2024
@thushan thushan deleted the dependabot/go_modules/github.com/puzpuzpuz/xsync/v3-3.3.1 branch July 12, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant