Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 586 Bytes

README.md

File metadata and controls

41 lines (33 loc) · 586 Bytes

gosync

go test -count 1000 .
ok  	_/Users/telepenin/src/go	0.200s

benchmarks

  • with sync.Mutex:
$ go test -bench=.
goos: darwin
goarch: amd64
BenchmarkMain-8   	    2875	    488201 ns/op
PASS
ok  	_/Users/telepenin/src/go	1.577s
  • with sync/atomic
$ go test -bench=.
goos: darwin
goarch: amd64
BenchmarkMain-8   	   32653	     35917 ns/op
PASS
ok  	_/Users/telepenin/src/go	1.672s
  • without async way
$go test -bench=.
goos: darwin
goarch: amd64
BenchmarkMain-8   	  535876	      2235 ns/op
PASS
ok  	_/Users/telepenin/src/go	1.351s