runtime: heap size increases from go1.8b2 to go1.9 (for map objects?) #21641
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8beta2 darwin/amd64
go version go1.9 darwin/amd64
Does this issue reproduce with the latest release?
go1.9 is the latest release.
What operating system and processor architecture are you using (
go env
)?$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ryan/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gg/sjs9r81j4pn_jfr5dsb2vdmm0000gn/T/go-build863027025=/tmp/go-build -gno-record-gcc-switches -fno-common"
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"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Code and Makefile:
https://play.golang.org/p/BHI9Z83OH_
What did you expect to see?
go1.9 performs on-par or better than previous versions.
What did you see instead?
$ make run
time ./m-1.8
690.032 690.032
2.95 real 3.67 user 0.84 sys
time ./m-1.9
693.451 693.451
2.81 real 3.53 user 0.63 sys
If I replace string values using string pointer - https://play.golang.org/p/QPHBXOtTfJ
$ make run
/usr/local/Cellar/go/1.8beta2_1/bin/go build -o m-1.8 m.go
/usr/local/Cellar/go/1.9/bin/go build -o m-1.9 m.go
time ./m-1.8
477.742 477.742
2.69 real 3.79 user 0.74 sys
time ./m-1.9
480.171 480.171
2.74 real 3.52 user 0.42 sys
There is always (?) a ~3M increase in heap usage.
The text was updated successfully, but these errors were encountered: