fix(deps): update module github.com/puzpuzpuz/xsync to v4 #286
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.5.2
->v4.1.0
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
puzpuzpuz/xsync (github.com/puzpuzpuz/xsync)
v4.1.0
Compare Source
UMPSCQueue
#168LoadAndDelete
andDelete
in case of non-existingMap
key #167Map
resize #170UMPSCQueue
is meant to serve as a replacement for a channel. However, crucially, it has infinite capacity. This is a very bad idea in many cases as it means that it never exhibits backpressure. In other words, if nothing is consuming elements from the queue, it will eventually consume all available memory and crash the process. However, there are also cases where this is desired behavior as it means the queue will dynamically allocate more memory to store temporary bursts, allowing producers to never block while the consumer catches up.From now on,
Map
spawns additional goroutines to speed up resizing the hash table. This can be disabled when creating aMap
with the newWithSerialResize
setting:Thanks @PapaCharlie and @llxisdsh for the contributions!
v4.0.0
Compare Source
MapOf
's hasher API is gone. The default and only hash function is now based onmaphash.Comparable
.Map
'sCompute
API now supports no-op (cancel) compute operation.Thanks @PapaCharlie for making this release happen
Migration notes
*Of
types are kept as type aliases for the renamed data structures to simplify the migration, e.g.MapOf
is an alias forMap
.NewMapOfPresized
function is gone.NewMap
combined withWithPresize
should be used instead.Map.Compute
method now expectsvalueFn
to return aComputeOp
value instead of a boolean flag. That's to support compute operation cancellation, so that the call does nothing.Map.LoadOrTryCompute
method is renamed toLoadOrCompute
. The oldLoadOrCompute
method is removed as it was redundant.v3.5.1
Compare Source
LoadOrCompute
andLoadOrTryCompute
#154v3.5.0
Compare Source
SPSCQueue
/SPSCQueueOf
#152LoadOrTryCompute
method toMap
/MapOf
#153Thanks @mattjohnsonpint for suggesting the map enhancement.
v3.4.1
Compare Source
ToPlainMap
/ToPlainMapOf
utility functions #151Thanks @KiddoV for suggesting this enhancement.
v3.4.0
Compare Source
RBMutex
#138 and #140Map
/MapOf
capacity calculation forWithPresize
#139RBMutex
now has methods for optimistic locking:Thanks @kkroo for the contribution.
v3.3.1
Compare Source
NewMapOfWithHasher
function #137Adds
NewMapOfWithHasher
function to support custom hash functions inMapOf
:Some custom hash functions may be faster than the built-in function if the lack of DDOS protection is fine.
Murmur3 finalizer:
Built-in hash function:
v3.3.0
Compare Source
MapOf
lookups #134Map
/MapOf
statistics #133Introduces 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 viam.Stats()
. They may be used for diagnostic purposes.v3.2.0
Compare Source
Adds options support to the
NewMap
/NewMapOf
functions. AMapOf
can now be created like this:NewPresizedMap
/NewPresizedMapOf
functions are deprecated. Use theWithPresize
option instead.Also, adds
WithGrowOnly
option. It configures newMap
/MapOf
instance to be grow-only. This means that the underlying hash table grows in capacity when new keys are added, but does not shrink when keys are deleted. The only exception to this rule is theClear
method which shrinks the hash table back to the initial capacity.Grow-only maps are more efficient in the case of oscillating map size, i.e. when the map frequently grows and then shrinks in size.
v3.1.0
Compare Source
NewMapPresized
/NewMapOfPresized
's argument is now treated as the minimal table capacity. The underlying hash table won't shrink beyond the specified capacity.Also, fixes and improves godoc.
v3.0.2
Compare Source
Thanks @mdumandag for reporting the issue.
v3.0.1
Compare Source
Map
/MapOf
resize (#111)Thanks @klauspost for reporting this issue.
v3.0.0
Compare Source
All
New*MapOf*
functions are now replaced with theNewMapOf
andNewMapOfPresized
functions. There is no longer a need to provide a user-defined hash function.Kudos go to @destel
v2.5.1
Compare Source
v2.5.0
Compare Source
MPMCQueueOf
) (#104)v2.4.1
Compare Source
v2.4.0
Compare Source
Map
andMapOf
(#86)Map
/MapOf.Range
(#87 and #88)v2.3.2
Compare Source
Thanks @felixge for holding a comprehensive (and lengthy) benchmarks run.
v2.3.1
Compare Source
MapOf
now takes full advantage of Go generics: less GC pressure, less atomic operations on reads, also improved integer hash functionv2.3.0
Compare Source
MapOf
integer hash function (#76)RBMutex
footprint and thread-to-slot distribution (#75)NewRBMutex()
function must be called now to initialize aRBMutex
.v2.2.0
Compare Source
Counter
thread-to-stripe distribution (#71 and #74)NewCounter()
function must be called now to initialize aCounter
.v2.1.0
Compare Source
Thanks @psyhatter and @veqryn for the contribution.
v2.0.2
Compare Source
v2.0.1
Compare Source
v2.0.0
Compare Source
MapOf
API in favor of the standardhash/maphash
package. The main difference is in thehasher
argument expected in theNewTypedMapOf
function.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.