hashmap
hashmap copied to clipboard
A Golang lock-free thread-safe HashMap optimized for fastest read access.
the size bigger,the speed lower!!!! for different keys 1000 = 1ms 10000 = 200ms 100000 = 129000ms only suit for small size map
Apparently it is not currently possible to add a reference to a struct as a key in the hashmap. This is valid in the native map, sync.Map, etc. In this...
I often have need for a concurrent list. Is the one used in hashmap possible to breal out into a library?
Now the add method code is like this: ``` func (l *List[Key, Value]) Add(searchStart *ListElement[Key, Value], hash uintptr, key Key, value Value) (element *ListElement[Key, Value], existed bool, inserted bool) {...
``` go: downloading github.com/alphadose/haxmap v1.1.0 go: downloading github.com/zhangyunhao116/skipmap v0.10.1 go: downloading github.com/puzpuzpuz/xsync/v2 v2.3.1 go: downloading github.com/zhangyunhao116/fastrand v0.3.0 ___gobench_benchmark_test_go.test.exe -test.v -test.paniconexit0 -test.bench ^\QBenchmarkReadHashMapUint\E|\QBenchmarkReadHashMapWithWritesUint\E|\QBenchmarkReadHashMapString\E|\QBenchmarkReadHaxMapUint\E|\QBenchmarkReadHaxMapWithWritesUint\E|\QBenchmarkReadXsyncMapUint\E|\QBenchmarkReadXsyncMapWithWritesUint\E|\QBenchmarkReadSkipMapUint\E|\QBenchmarkReadGoMapUintUnsafe\E|\QBenchmarkReadGoMapUintMutex\E|\QBenchmarkReadGoMapWithWritesUintMutex\E|\QBenchmarkReadGoSyncMapUint\E|\QBenchmarkReadGoSyncMapWithWritesUint\E|\QBenchmarkReadGoMapStringUnsafe\E|\QBenchmarkReadGoMapStringMutex\E|\QBenchmarkWriteHashMapUint\E|\QBenchmarkWriteGoMapMutexUint\E|\QBenchmarkWriteGoSyncMapUint\E$ -test.run ^$ #gosetup goos: windows goarch: amd64 pkg:...
releat issue: https://github.com/cornelk/hashmap/issues/75
**Describe the bug** Under certain cases of large data it seems that the map performs unexpectedly, meaning it performs differently from sync.Map, a normal map with a RWMutex, and what's...
We would like to use struct keys, but do not need a general "supports all structs" approach being asked for in #53 . We can chain hashmaps together, but that...
**Describe the bug** The benchmark test cannot complete, and fmt.Println(111) fails to print any output. The test appears to hang indefinitely. **To Reproduce** Run the test function: ``` const countLoad...