hashmap icon indicating copy to clipboard operation
hashmap copied to clipboard

i changed some case with grow and the write speed is more quickly than others

Open godcong opened this issue 3 years ago • 1 comments

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: github.com/cornelk/hashmap/benchmarks
cpu: 12th Gen Intel(R) Core(TM) i7-12700H
BenchmarkReadHashMapUint
BenchmarkReadHashMapUint-20                      1873369               637.8 ns/
op
BenchmarkReadHashMapWithWritesUint
BenchmarkReadHashMapWithWritesUint-20            1692416               931.1 ns/
op
BenchmarkReadHashMapString
BenchmarkReadHashMapString-20                     669466              1855 ns/op

BenchmarkReadHaxMapUint
BenchmarkReadHaxMapUint-20                       1306148               908.1 ns/
op
BenchmarkReadHaxMapWithWritesUint
BenchmarkReadHaxMapWithWritesUint-20             1000000              1012 ns/op

BenchmarkReadXsyncMapUint
BenchmarkReadXsyncMapUint-20                     2135721               558.0 ns/
op
BenchmarkReadXsyncMapWithWritesUint
BenchmarkReadXsyncMapWithWritesUint-20           1880142               639.1 ns/
op
BenchmarkReadSkipMapUint
BenchmarkReadSkipMapUint-20                       292872              3739 ns/op

BenchmarkReadGoMapUintUnsafe
BenchmarkReadGoMapUintUnsafe-20                  1429987               826.3 ns/
op
BenchmarkReadGoMapUintMutex
BenchmarkReadGoMapUintMutex-20                     27703             42727 ns/op

BenchmarkReadGoMapWithWritesUintMutex
BenchmarkReadGoMapWithWritesUintMutex-20           16222             74400 ns/op

BenchmarkReadGoSyncMapUint
BenchmarkReadGoSyncMapUint-20                     498957              2874 ns/op

BenchmarkReadGoSyncMapWithWritesUint
BenchmarkReadGoSyncMapWithWritesUint-20           370120              3121 ns/op

BenchmarkReadGoMapStringUnsafe
BenchmarkReadGoMapStringUnsafe-20                 815277              1415 ns/op

BenchmarkReadGoMapStringMutex
BenchmarkReadGoMapStringMutex-20                   26961             45183 ns/op

BenchmarkWriteHashMapUint
BenchmarkWriteHashMapUint-20                       49916             22889 ns/op

BenchmarkWriteGoMapMutexUint
BenchmarkWriteGoMapMutexUint-20                    42570             25949 ns/op

BenchmarkWriteGoSyncMapUint
BenchmarkWriteGoSyncMapUint-20                     16687             71979 ns/op

PASS

godcong avatar Jan 29 '23 09:01 godcong

The use of a separate concurrent process reduces the overhead of frequently opening concurrent processes

godcong avatar Jan 29 '23 10:01 godcong