• Eric Eisner's avatar
    strings: implement a faster generic Replacer · 0aad3cdc
    Eric Eisner authored
    This also fixes the semantics of some corner cases with the empty
    match. TODOs for genericReplacer in the tests are fixed.
    
    benchmark                  old ns/op    new ns/op    delta
    BenchmarkGenericNoMatch        71395         3132  -95.61%
    BenchmarkGenericMatch1         75610        20280  -73.18%
    BenchmarkGenericMatch2        837995        86725  -89.65%
    
    R=nigeltao, rsc
    CC=golang-dev
    https://golang.org/cl/6492076
    0aad3cdc
Name
Last commit
Last update
..
example_test.go Loading commit data...
export_test.go Loading commit data...
reader.go Loading commit data...
reader_test.go Loading commit data...
replace.go Loading commit data...
replace_test.go Loading commit data...
strings.go Loading commit data...
strings_test.go Loading commit data...