1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:21:23 -06:00
go/src/pkg/strings
Eric Eisner 0aad3cdc59 strings: implement a faster generic Replacer
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
2012-09-17 11:50:15 +10:00
..
example_test.go go/parser: fix comment grouping (day 1 bug) 2012-05-22 10:04:34 -07:00
export_test.go strings: implement a faster generic Replacer 2012-09-17 11:50:15 +10:00
reader_test.go bytes,strings: make *Reader implement io.ReaderAt 2012-02-15 12:58:00 +11:00
reader.go bytes,strings: make *Reader implement io.ReaderAt 2012-02-15 12:58:00 +11:00
replace_test.go strings: implement a faster generic Replacer 2012-09-17 11:50:15 +10:00
replace.go strings: implement a faster generic Replacer 2012-09-17 11:50:15 +10:00
strings_test.go panics: use the new facilities of testing.B instead 2011-12-20 10:36:25 -08:00
strings.go update tree for new default type rule 2011-12-08 22:08:03 -05:00