go/src/bytes
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
..
boundary_test.go bytes: reduce work in IndexNearPageBoundary test 2017-11-04 11:09:49 +00:00
buffer.go bytes: mention strings.Builder in Buffer.String docs 2017-11-30 01:46:50 +00:00
buffer_test.go bytes: panic in ReadFrom with more information with negative Read counts 2017-10-06 06:49:40 +00:00
bytes.go bytes, strings: improve EqualFold fast version for ASCII 2018-05-01 18:52:19 +00:00
bytes_decl.go internal/bytealg: move compare functions to bytealg 2018-03-04 17:49:39 +00:00
bytes_test.go internal/bytealg: move Count to bytealg 2018-03-04 17:49:25 +00:00
compare_test.go all: single space after period. 2016-03-02 00:13:47 +00:00
example_test.go bytes, strings: restore O(1) behavior of IndexAny(s, "") and LastIndexAny(s, "") 2017-11-15 21:26:05 +00:00
export_test.go internal/bytealg: move Count to bytealg 2018-03-04 17:49:25 +00:00
reader.go bytes: add documentation to reader methods 2017-09-21 18:57:04 +00:00
reader_test.go bytes: improve test readability 2017-09-20 13:41:03 +00:00