1
0
mirror of https://github.com/golang/go synced 2024-10-04 15:11:20 -06:00
go/src/unicode
Egon Elbre e607abbfd6 unicode: improve SimpleFold performance for ascii
This change significantly speeds up case-insensitive regexp matching.

benchmark                      old ns/op      new ns/op      delta
BenchmarkMatchEasy0i_32-8      2690           1473           -45.24%
BenchmarkMatchEasy0i_1K-8      80404          42269          -47.43%
BenchmarkMatchEasy0i_32K-8     3272187        2076118        -36.55%
BenchmarkMatchEasy0i_1M-8      104805990      66503805       -36.55%
BenchmarkMatchEasy0i_32M-8     3360192200     2126121600     -36.73%

benchmark                      old MB/s     new MB/s     speedup
BenchmarkMatchEasy0i_32-8      11.90        21.72        1.83x
BenchmarkMatchEasy0i_1K-8      12.74        24.23        1.90x
BenchmarkMatchEasy0i_32K-8     10.01        15.78        1.58x
BenchmarkMatchEasy0i_1M-8      10.00        15.77        1.58x
BenchmarkMatchEasy0i_32M-8     9.99         15.78        1.58x

Issue #13288

Change-Id: I94af7bb29e75d60b4f6ee760124867ab271b9642
Reviewed-on: https://go-review.googlesource.com/16943
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-26 21:59:50 +00:00
..
utf8 all: single space after period. 2016-03-02 00:13:47 +00:00
utf16 all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
casetables.go
digit_test.go
digit.go
example_test.go unicode: add function level examples 2015-11-24 17:13:21 +00:00
graphic_test.go
graphic.go all: single space after period. 2016-03-02 00:13:47 +00:00
letter_test.go unicode: upgrade to 8.0.0 2015-06-26 18:01:29 +00:00
letter.go unicode: improve SimpleFold performance for ascii 2016-04-26 21:59:50 +00:00
maketables.go unicode: improve SimpleFold performance for ascii 2016-04-26 21:59:50 +00:00
script_test.go unicode: upgrade to 8.0.0 2015-06-26 18:01:29 +00:00
tables.go unicode: improve SimpleFold performance for ascii 2016-04-26 21:59:50 +00:00