]> Cypherpunks repositories - gostls13.git/commit
runtime: faster string equality.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 5 Aug 2012 19:35:41 +0000 (21:35 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 5 Aug 2012 19:35:41 +0000 (21:35 +0200)
commit77f3e189d2bd4eb015235d200ca75803e45c87ef
tree76a992e3dbc8ae3170f5e28917bbefd7a6c0178c
parentab058b35402aded8579e3e9653c0d78c5c4e9e5e
runtime: faster string equality.

benchmark                                old ns/op    new ns/op    delta
BenchmarkCompareStringEqual                     51           35  -30.20%
BenchmarkCompareStringIdentical                 51            7  -85.71%
BenchmarkCompareStringSameLength                25           18  -28.29%
BenchmarkCompareStringDifferentLength            2            2   +1.46%

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/6450092
src/cmd/gc/builtin.c
src/cmd/gc/runtime.go
src/cmd/gc/walk.c
src/pkg/runtime/alg.c
src/pkg/runtime/string.goc
src/pkg/runtime/string_test.go [new file with mode: 0644]