go: runtime: go 1.10beta2 Benchmarks slower on Mac (possibly related to time)
What version of Go are you using (go version
)?
go version go1.10beta2 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jlindamo/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jlindamo/go"
GORACE=""
GOROOT="/Users/jlindamo/sdk/go1.10beta2"
GOTMPDIR=""
GOTOOLDIR="/Users/jlindamo/sdk/go1.10beta2/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/hz/fdkmg98n3wx1xth0ypjq1s4c3xsp_j/T/go-build325901435=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Ran my benchmarks on go 1.9 and go 1.10
What did you expect to see?
Little or no change in timings
What did you see instead?
Differences by up to 600%
To reproduce:
go get github.com/cep21/circuit
cd $GOPATH/src/github.com/cep21/circuit
make bench
I ran benchmarks for go 1.9 and go 1.10. There is the result of benchcmp
> benchcmp /tmp/go1.9.2 /tmp/go1.10.b2
benchmark old ns/op new ns/op delta
BenchmarkCiruits/cep21-circuit/Hystrix/passing/1-8 767 1698 +121.38%
BenchmarkCiruits/cep21-circuit/Hystrix/passing/75-8 436 666 +52.75%
BenchmarkCiruits/cep21-circuit/Hystrix/failing/1-8 103 333 +223.30%
BenchmarkCiruits/cep21-circuit/Hystrix/failing/75-8 79.1 159 +101.01%
BenchmarkCiruits/cep21-circuit/Minimal/passing/1-8 159 800 +403.14%
BenchmarkCiruits/cep21-circuit/Minimal/passing/75-8 84.4 496 +487.68%
BenchmarkCiruits/cep21-circuit/Minimal/failing/1-8 58.4 282 +382.88%
BenchmarkCiruits/cep21-circuit/Minimal/failing/75-8 20.3 159 +683.25%
BenchmarkCiruits/cep21-circuit/UseGo/passing/1-8 1361 1932 +41.95%
BenchmarkCiruits/cep21-circuit/UseGo/passing/75-8 363 622 +71.35%
BenchmarkCiruits/cep21-circuit/UseGo/failing/1-8 1454 1994 +37.14%
BenchmarkCiruits/cep21-circuit/UseGo/failing/75-8 385 674 +75.06%
BenchmarkCiruits/GoHystrix/DefaultConfig/passing/1-8 10198 10182 -0.16%
BenchmarkCiruits/GoHystrix/DefaultConfig/passing/75-8 2897 3091 +6.70%
BenchmarkCiruits/GoHystrix/DefaultConfig/failing/1-8 6376 7215 +13.16%
BenchmarkCiruits/GoHystrix/DefaultConfig/failing/75-8 1589 1912 +20.33%
BenchmarkCiruits/rubyist/Threshold-10/passing/1-8 1671 2021 +20.95%
BenchmarkCiruits/rubyist/Threshold-10/passing/75-8 878 1662 +89.29%
BenchmarkCiruits/rubyist/Threshold-10/failing/1-8 132 325 +146.21%
BenchmarkCiruits/rubyist/Threshold-10/failing/75-8 1450 2750 +89.66%
BenchmarkCiruits/gobreaker/Default/passing/1-8 207 588 +184.06%
BenchmarkCiruits/gobreaker/Default/passing/75-8 757 734 -3.04%
BenchmarkCiruits/gobreaker/Default/failing/1-8 94.5 282 +198.41%
BenchmarkCiruits/gobreaker/Default/failing/75-8 376 358 -4.79%
BenchmarkCiruits/handy/Default/passing/1-8 1105 1377 +24.62%
BenchmarkCiruits/handy/Default/passing/75-8 1377 1860 +35.08%
BenchmarkCiruits/handy/Default/failing/1-8 1383 1293 -6.51%
BenchmarkCiruits/handy/Default/failing/75-8 1699 1701 +0.12%
BenchmarkCiruits/iand_circuit/Default/passing/1-8 122 113 -7.38%
BenchmarkCiruits/iand_circuit/Default/passing/75-8 312 299 -4.17%
BenchmarkCiruits/iand_circuit/Default/failing/1-8 21.4 23.2 +8.41%
BenchmarkCiruits/iand_circuit/Default/failing/75-8 5.71 8.51 +49.04%
BenchmarkRollingCounter/super-small-buckets/1-8 98.6 90.9 -7.81%
BenchmarkRollingCounter/super-small-buckets/50-8 191 185 -3.14%
BenchmarkRollingCounter/normal-rate/1-8 63.7 61.1 -4.08%
BenchmarkRollingCounter/normal-rate/50-8 84.1 85.5 +1.66%
BenchmarkRollingCounter/default/1-8 60.6 57.2 -5.61%
BenchmarkRollingCounter/default/50-8 71.2 84.1 +18.12%
benchmark old allocs new allocs delta
BenchmarkCiruits/cep21-circuit/Hystrix/passing/1-8 4 4 +0.00%
BenchmarkCiruits/cep21-circuit/Hystrix/passing/75-8 4 4 +0.00%
BenchmarkCiruits/cep21-circuit/Hystrix/failing/1-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Hystrix/failing/75-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/passing/1-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/passing/75-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/failing/1-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/failing/75-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/passing/1-8 5 5 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/passing/75-8 5 4 -20.00%
BenchmarkCiruits/cep21-circuit/UseGo/failing/1-8 5 5 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/failing/75-8 5 4 -20.00%
BenchmarkCiruits/GoHystrix/DefaultConfig/passing/1-8 18 18 +0.00%
BenchmarkCiruits/GoHystrix/DefaultConfig/passing/75-8 20 20 +0.00%
BenchmarkCiruits/GoHystrix/DefaultConfig/failing/1-8 19 19 +0.00%
BenchmarkCiruits/GoHystrix/DefaultConfig/failing/75-8 20 20 +0.00%
BenchmarkCiruits/rubyist/Threshold-10/passing/1-8 5 5 +0.00%
BenchmarkCiruits/rubyist/Threshold-10/passing/75-8 4 4 +0.00%
BenchmarkCiruits/rubyist/Threshold-10/failing/1-8 0 0 +0.00%
BenchmarkCiruits/rubyist/Threshold-10/failing/75-8 5 5 +0.00%
BenchmarkCiruits/gobreaker/Default/passing/1-8 0 0 +0.00%
BenchmarkCiruits/gobreaker/Default/passing/75-8 0 0 +0.00%
BenchmarkCiruits/gobreaker/Default/failing/1-8 0 0 +0.00%
BenchmarkCiruits/gobreaker/Default/failing/75-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/passing/1-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/passing/75-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/failing/1-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/failing/75-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/passing/1-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/passing/75-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/failing/1-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/failing/75-8 0 0 +0.00%
BenchmarkRollingCounter/super-small-buckets/1-8 0 0 +0.00%
BenchmarkRollingCounter/super-small-buckets/50-8 0 0 +0.00%
BenchmarkRollingCounter/normal-rate/1-8 0 0 +0.00%
BenchmarkRollingCounter/normal-rate/50-8 0 0 +0.00%
BenchmarkRollingCounter/default/1-8 0 0 +0.00%
BenchmarkRollingCounter/default/50-8 0 0 +0.00%
benchmark old bytes new bytes delta
BenchmarkCiruits/cep21-circuit/Hystrix/passing/1-8 192 208 +8.33%
BenchmarkCiruits/cep21-circuit/Hystrix/passing/75-8 192 208 +8.33%
BenchmarkCiruits/cep21-circuit/Hystrix/failing/1-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Hystrix/failing/75-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/passing/1-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/passing/75-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/failing/1-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/Minimal/failing/75-8 0 0 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/passing/1-8 256 256 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/passing/75-8 256 256 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/failing/1-8 256 256 +0.00%
BenchmarkCiruits/cep21-circuit/UseGo/failing/75-8 256 255 -0.39%
BenchmarkCiruits/GoHystrix/DefaultConfig/passing/1-8 1005 1015 +1.00%
BenchmarkCiruits/GoHystrix/DefaultConfig/passing/75-8 1000 1022 +2.20%
BenchmarkCiruits/GoHystrix/DefaultConfig/failing/1-8 1013 1037 +2.37%
BenchmarkCiruits/GoHystrix/DefaultConfig/failing/75-8 1005 1013 +0.80%
BenchmarkCiruits/rubyist/Threshold-10/passing/1-8 332 348 +4.82%
BenchmarkCiruits/rubyist/Threshold-10/passing/75-8 309 324 +4.85%
BenchmarkCiruits/rubyist/Threshold-10/failing/1-8 0 0 +0.00%
BenchmarkCiruits/rubyist/Threshold-10/failing/75-8 304 320 +5.26%
BenchmarkCiruits/gobreaker/Default/passing/1-8 0 0 +0.00%
BenchmarkCiruits/gobreaker/Default/passing/75-8 0 0 +0.00%
BenchmarkCiruits/gobreaker/Default/failing/1-8 0 0 +0.00%
BenchmarkCiruits/gobreaker/Default/failing/75-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/passing/1-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/passing/75-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/failing/1-8 0 0 +0.00%
BenchmarkCiruits/handy/Default/failing/75-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/passing/1-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/passing/75-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/failing/1-8 0 0 +0.00%
BenchmarkCiruits/iand_circuit/Default/failing/75-8 0 0 +0.00%
BenchmarkRollingCounter/super-small-buckets/1-8 0 0 +0.00%
BenchmarkRollingCounter/super-small-buckets/50-8 0 0 +0.00%
BenchmarkRollingCounter/normal-rate/1-8 0 0 +0.00%
BenchmarkRollingCounter/normal-rate/50-8 0 0 +0.00%
BenchmarkRollingCounter/default/1-8 0 0 +0.00%
BenchmarkRollingCounter/default/50-8 0 0 +0.00%
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (21 by maintainers)
@cep21 it would be great if you could test this patch, as I don’t have Sierra available.
It’ll be
13
. It looks like I made an oversight when preparing d8ff3d592: Apple did not increment the commpage version in High Sierra. I had assumed so because they added more fields and changed the way the real time is computed, but that’s probably a backward compatible change for whatever API/ABI is enforced for commpage. I should have known better and double-checked with a git blame over XNU sources.I’ll prepare a fix tomorrow.