• Russ Cox's avatar
    unicode: performance improvements (API change) · 4591cd63
    Russ Cox authored
    *** There is an API change here: the introduction of the
    LatinOffset int in the RangeTable struct. ***
    
    * Avoid checking Latin range multiple times for non-Latin runes.
    * Use linear search when it is faster than binary search.
    
    go test -calibrate runs the calibration for where the linear/binary
    crossover should be.
    
    benchmark                       old MB/s     new MB/s  speedup
    BenchmarkFields            36.27        41.43    1.14x
    BenchmarkFieldsFunc        36.23        41.38    1.14x
    
    The speedup here is evenly split between the linear scans
    and the LatinOffset change. Both are about 1.07x.
    
    R=r
    CC=bradfitz, gobot, golang-dev
    https://golang.org/cl/6526048
    4591cd63
Name
Last commit
Last update
..
utf16 Loading commit data...
utf8 Loading commit data...
Makefile Loading commit data...
casetables.go Loading commit data...
digit.go Loading commit data...
digit_test.go Loading commit data...
graphic.go Loading commit data...
graphic_test.go Loading commit data...
letter.go Loading commit data...
letter_test.go Loading commit data...
maketables.go Loading commit data...
script_test.go Loading commit data...
tables.go Loading commit data...