]> Cypherpunks repositories - gostls13.git/commit
cmd/6c, cmd/8c: avoid generating long multiplication when not necessary.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 4 Jun 2013 06:33:00 +0000 (08:33 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 4 Jun 2013 06:33:00 +0000 (08:33 +0200)
commit2c0b00744f067c7d9f44a735f77aa0eb0e2e345e
tree71414e458ff3f2d33f82cb763cf40b61786bbbfb
parent62891fb811980cce1f859254306265f2d4922da2
cmd/6c, cmd/8c: avoid generating long multiplication when not necessary.

On amd64
benchmark                        old ns/op    new ns/op    delta
BenchmarkHashStringSpeed                91           74  -18.49%
BenchmarkHashInt32Speed                 54           45  -17.88%
BenchmarkHashInt64Speed                 76           58  -23.53%
BenchmarkHashStringArraySpeed          231          188  -18.61%

Fixes #5367.

R=golang-dev, iant, dave, daniel.morsing, ality, rsc
CC=golang-dev
https://golang.org/cl/9040043
src/cmd/6c/cgen.c
src/cmd/8c/cgen.c