Skip to content

cmd/compile: 63% benchmark slowdown in 1.7 -> 1.8rc2 #18740

@ScottMansfield

Description

@ScottMansfield

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

$ go version
go version go1.7 darwin/amd64

$ go1.8rc2 version
go version go1.8rc2 darwin/amd64

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/smansfield/gopkg"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/f2/wwlcfvc5267dkl3c2_5_mcsw0000gp/T/go-build461692826=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

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.

I have the disasm output for both 1.7 and 1.8 with a command to run benchtime 10s

1.7: https://play.golang.org/p/N04n8MwmS4

1.8: https://play.golang.org/p/sZpOz59PbS

What did you expect to see?

Approximately equal or better performance

What did you see instead?

Worse performance by far for 1.8, by 63% - 65%

What's interesting in the 1.8 output is that the profiling shows a single MOVL taking 4.98 of the 9.37 seconds

4.98s 1144938: MOVL 0x30(SP), CX

Unfortunately the code to do all this is private, but I might be able to extract an example if it's necessary. Right now I don't have one outside my project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions