]> Cypherpunks repositories - gostls13.git/commit
cmd/5g: avoid temporary during OMINUS
authorDave Cheney <dave@cheney.net>
Wed, 12 Dec 2012 08:25:22 +0000 (19:25 +1100)
committerDave Cheney <dave@cheney.net>
Wed, 12 Dec 2012 08:25:22 +0000 (19:25 +1100)
commit5bdf40dccab1fec0660c4374be9046d82a1a004f
tree0858def25772229cfb22d09eedc79b6f1a7baa89
parent11999306df8b02dbbf26ac0772429c8ca5754ab5
cmd/5g: avoid temporary during OMINUS

Saves one MOVW and one register during the fast div/mod introduced in CL 6819123.

linux/arm (armv5)

benchmark               old ns/op    new ns/op    delta
BenchmarkInt64Mod1             12           12   +7.50%
BenchmarkUint16Mod2             7            7   +0.28%
BenchmarkUint16Mod4             7            7   -0.28%
BenchmarkUint64Mod1            15           11  -23.72%
BenchmarkInt8Neg                8            7  -17.66%
BenchmarkInt16Neg               8            7  -17.66%
BenchmarkInt32Neg               5            5   -9.04%
BenchmarkUint8Neg               7            6  -14.35%
BenchmarkUint16Neg              8            7  -17.66%
BenchmarkUint32Neg              5            5   -9.04%

R=rsc
CC=golang-dev
https://golang.org/cl/6842045
src/cmd/5g/cgen.c
src/cmd/5g/gsubr.c