forked from mirror/abool
Update benchmark to Go 1.14.3 on Linux
Assuming that Linux is a more popular platform than Darwin when running this package
This commit is contained in:
parent
8ad37317dc
commit
17b218e8c9
30
README.md
30
README.md
|
@ -30,27 +30,31 @@ type Foo struct {
|
|||
|
||||
## Benchmark
|
||||
|
||||
- Go 1.11.5
|
||||
- OS X 10.14.5
|
||||
- Go 1.14.3
|
||||
- Linux 4.19.0
|
||||
|
||||
```bash
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
|
||||
```shell
|
||||
# Read
|
||||
BenchmarkMutexRead-4 100000000 14.7 ns/op
|
||||
BenchmarkAtomicValueRead-4 2000000000 0.45 ns/op
|
||||
BenchmarkAtomicBoolRead-4 2000000000 0.35 ns/op # <--- This package
|
||||
BenchmarkMutexRead-4 86662128 14.2 ns/op
|
||||
BenchmarkAtomicValueRead-4 1000000000 0.755 ns/op
|
||||
BenchmarkAtomicBoolRead-4 1000000000 0.720 ns/op # <--- This package
|
||||
|
||||
|
||||
# Write
|
||||
BenchmarkMutexWrite-4 100000000 14.5 ns/op
|
||||
BenchmarkAtomicValueWrite-4 100000000 10.5 ns/op
|
||||
BenchmarkAtomicBoolWrite-4 300000000 5.21 ns/op # <--- This package
|
||||
BenchmarkMutexWrite-4 76237544 13.6 ns/op
|
||||
BenchmarkAtomicValueWrite-4 79471124 14.9 ns/op
|
||||
BenchmarkAtomicBoolWrite-4 178218270 6.73 ns/op # <--- This package
|
||||
|
||||
# CAS
|
||||
BenchmarkMutexCAS-4 50000000 31.3 ns/op
|
||||
BenchmarkAtomicBoolCAS-4 200000000 7.18 ns/op # <--- This package
|
||||
BenchmarkMutexCAS-4 29416574 34.7 ns/op
|
||||
BenchmarkAtomicBoolCAS-4 171900002 7.14 ns/op # <--- This package
|
||||
|
||||
# Toggle
|
||||
BenchmarkMutexToggle-4 50000000 32.6 ns/op
|
||||
BenchmarkAtomicBoolToggle-4 300000000 5.21 ns/op # <--- This package
|
||||
BenchmarkMutexToggle-4 35212117 34.5 ns/op
|
||||
BenchmarkAtomicBoolToggle-4 169871972 7.02 ns/op # <--- This package
|
||||
```
|
||||
|
||||
## Special thanks to contributors
|
||||
|
|
Loading…
Reference in New Issue