Releases: cornelk/hashmap
Releases · cornelk/hashmap
v1.0.8 hashing improvements
v1.0.7 hashing improvements
- optimized hashing by separating string support into separate type
- removed all external dependencies
v1.0.6 hashing improvements
- optimize hashing by Inlining hashing as anonymous functions
- reduce allocations for write operations
v1.0.5 hashing improvements and fix
- fix hashing on ARM CPUs
- optimize hashing by using specialized xxhash implementations
- reduce variable allocations in get functions
- removed obsolete 0 length checks
It is noticeable faster than the current version of HaxMap is able to handle collisions of valid 0 hash values:
BenchmarkReadHashMapUint-8 1314156 955.6 ns/op
BenchmarkReadHaxMapUint-8 872134 1316 ns/op (can not handle hash 0 collisions)
// works for this library, fails for HaxMap
func TestHash0Collision(t *testing.T) {
m := New[string, int]()
staticHasher := func(key string) uintptr {
return 0
}
m.SetHasher(staticHasher)
m.Set("1", 1)
m.Set("2", 2)
_, ok := m.Get("1")
if !ok {
t.Error("1 not found")
}
_, ok = m.Get("2")
if !ok {
t.Error("2 not found")
}
}
v1.0.4 concurrent insert bug fixes
- fixed insert during map grow
- fixed add not working properly during concurrent delete
- add SetHasher function to allow setting of a custom hasher
- benchmarks have been moved to a subdirectory to remove imports for external libraries from main module
v1.0.3 Generics version improvements
- CAS has been removed as it is not working
- Iter function signature has been changed to Range
- all comparable key types are supported now
v1.0.2 Generics version
- fix hash collision handling
- switch library to use generics
- minor API changes
- CAS is currently not supported
- removed []byte key support
v1.0.1: Merge pull request #41 from tigrato/delhashedkey
- Fixed delete action when using hashed key
- Fixed race condition in list