1
0
mirror of https://github.com/golang/go synced 2024-10-02 08:18:32 -06:00
go/src/strings
Eric Pauley 9d11c63b64 bytes, strings: improve EqualFold fast version for ASCII
The existing implementation only considers the special ASCII
case when the lower character is an upper case letter. This
means that most ASCII comparisons use unicode.SimpleFold even
when it is not necessary.

benchmark                old ns/op     new ns/op     delta
BenchmarkEqualFold-8     450           390           -13.33%

Change-Id: I735ca3c30fc0145c186d2a54f31fd39caab2c3fa
Reviewed-on: https://go-review.googlesource.com/110018
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-01 18:52:19 +00:00
..
builder_test.go strings: fix flaky TestBuilderGrow test 2018-04-03 00:11:46 +00:00
builder.go strings: prevent copyCheck from forcing Builder to escape and allocate 2018-01-09 22:01:28 +00:00
compare_test.go
compare.go
example_test.go strings: add Builder 2017-11-06 18:23:51 +00:00
export_test.go
reader_test.go
reader.go
replace_test.go strings: speed up Map 2017-02-24 22:53:05 +00:00
replace.go strings: clarify Replacer's replacement order 2018-04-26 15:11:58 +00:00
search_test.go
search.go
strings_decl.go internal/bytealg: move IndexByte asssembly to the new bytealg package 2018-03-02 22:46:15 +00:00
strings_test.go bytes, strings: improve EqualFold fast version for ASCII 2018-05-01 18:52:19 +00:00
strings.go bytes, strings: improve EqualFold fast version for ASCII 2018-05-01 18:52:19 +00:00
strings.s