]> Cypherpunks repositories - gostls13.git/commit
runtime: Optimize aeshash a bit. Use a better predicted branch
authorKeith Randall <khr@golang.org>
Wed, 15 May 2013 16:40:14 +0000 (09:40 -0700)
committerKeith Randall <khr@golang.org>
Wed, 15 May 2013 16:40:14 +0000 (09:40 -0700)
commitee66972dce0afc5a0cf86be17d6e79cab418f701
tree04ffa2ee77a939b386d1e90b187d1271628b4617
parent23ad56311977b4a4bfff78fb5f674616e0272445
runtime: Optimize aeshash a bit.  Use a better predicted branch
for checking for page boundary.  Also avoid boundary check
when >=16 bytes are hashed.

benchmark                        old ns/op    new ns/op    delta
BenchmarkHashStringSpeed                23           22   -0.43%
BenchmarkHashBytesSpeed                 44           42   -3.61%
BenchmarkHashStringArraySpeed           71           68   -4.05%

R=iant, khr
CC=gobot, golang-dev, google
https://golang.org/cl/9123046
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/mapspeed_test.go