Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
godcong opened this issue Jan 29, 2023 · 1 comment

Comments

@godcong
Copy link

godcong commented Jan 29, 2023

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
Copy link
Author

godcong commented Jan 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant