]> Cypherpunks repositories - gostls13.git/commit
runtime: speed up eqstring
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 5 Feb 2015 01:31:37 +0000 (17:31 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 6 Feb 2015 18:51:00 +0000 (18:51 +0000)
commit135ef49fde39c95fe61212376172c6ad333449c0
tree71e92329e9c033fca720baaa31faee70ef26913a
parent15594df6b4e913d1ed9d7b38fa71868be28e9b63
runtime: speed up eqstring

eqstring does not need to check the length of the strings.

6g

benchmark                              old ns/op     new ns/op     delta
BenchmarkCompareStringEqual            7.03          6.14          -12.66%
BenchmarkCompareStringIdentical        3.36          3.04          -9.52%

5g

benchmark                                 old ns/op     new ns/op     delta
BenchmarkCompareStringEqual               238           232           -2.52%
BenchmarkCompareStringIdentical           90.8          80.7          -11.12%

The equivalent PPC changes are in a separate commit
because I don't have the hardware to test them.

Change-Id: I292874324b9bbd9d24f57a390cfff8b550cdd53c
Reviewed-on: https://go-review.googlesource.com/3955
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/gc/walk.c
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s