• Josh Bleecher Snyder's avatar
    runtime: speed up eqstring · 135ef49f
    Josh Bleecher Snyder authored
    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/3955Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    135ef49f
asm_amd64p32.s 22.8 KB