Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 30, 2024

Bumps github.com/puzpuzpuz/xsync/v3 from 3.2.0 to 3.4.0.

Release notes

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

v3.4.0

  • Add optimistic locking methods to RBMutex #138 and #140
  • Fix Map/MapOf capacity calculation for WithPresize #139

RBMutex now has methods for optimistic locking:

mu := xsync.NewRBMutex()
if locked, t := mu.TryRLock(); locked {
	// critical reader section...
	mu.RUnlock(t)
}
if mu.TryLock() {
	// critical writer section...
	mu.Unlock()
}

Thanks @​kkroo for the contribution.

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

... (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)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Aug 30, 2024
Bumps [github.com/puzpuzpuz/xsync/v3](https://github.com/puzpuzpuz/xsync) from 3.2.0 to 3.4.0.
- [Release notes](https://github.com/puzpuzpuz/xsync/releases)
- [Commits](puzpuzpuz/xsync@v3.2.0...v3.4.0)

---
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 force-pushed the dependabot/go_modules/github.com/puzpuzpuz/xsync/v3-3.4.0 branch from bfe1b14 to 38d277d Compare August 30, 2024 16:04
@coadler coadler merged commit e149173 into main Aug 30, 2024
@coadler coadler deleted the dependabot/go_modules/github.com/puzpuzpuz/xsync/v3-3.4.0 branch August 30, 2024 16:06
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