]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: inline convT2E when T is uintptr-shaped.
authorNigel Tao <nigeltao@golang.org>
Thu, 14 Jun 2012 00:43:20 +0000 (10:43 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 14 Jun 2012 00:43:20 +0000 (10:43 +1000)
commit8f84328fdc6f625359c8fc8498cfc48689673ea3
treee19b4dd9e95c51ba4dd5d84f73723e70c55a9da6
parent733ee91786ef4fd8a13a272745f0458a3ed74e50
cmd/gc: inline convT2E when T is uintptr-shaped.

GOARCH=amd64 benchmarks

src/pkg/runtime
benchmark                  old ns/op    new ns/op    delta
BenchmarkConvT2ESmall             10           10   +1.00%
BenchmarkConvT2EUintptr            9            0  -92.07%
BenchmarkConvT2EBig               74           74   -0.27%
BenchmarkConvT2I                  27           26   -3.62%
BenchmarkConvI2E                   4            4   -7.05%
BenchmarkConvI2I                  20           19   -2.99%

test/bench/go1
benchmark                 old ns/op    new ns/op    delta
BenchmarkBinaryTree17    5930908000   5937260000   +0.11%
BenchmarkFannkuch11      3927057000   3933556000   +0.17%
BenchmarkGobDecode         21998090     21870620   -0.58%
BenchmarkGobEncode         12725310     12734480   +0.07%
BenchmarkGzip             567617600    567892800   +0.05%
BenchmarkGunzip           178284100    178706900   +0.24%
BenchmarkJSONEncode        87693550     86794300   -1.03%
BenchmarkJSONDecode       314212600    324115000   +3.15%
BenchmarkMandelbrot200      7016640      7073766   +0.81%
BenchmarkParse              7852100      7892085   +0.51%
BenchmarkRevcomp         1285663000   1286147000   +0.04%
BenchmarkTemplate         566823800    567606200   +0.14%

I'm not entirely sure why the JSON* numbers have changed, but
eyeballing the profile suggests that it could be spending less
and more time in runtime.{new,old}stack, so it could simply be
stack-split boundary noise.

R=rsc, dave, bsiegert, dsymonds
CC=golang-dev
https://golang.org/cl/6280049
src/cmd/5g/cgen.c
src/cmd/6g/cgen.c
src/cmd/8g/cgen.c
src/cmd/gc/gen.c
src/cmd/gc/go.h
src/cmd/gc/walk.c
src/pkg/runtime/iface_test.go
test/convT2E.go [new file with mode: 0644]