1
0
mirror of https://github.com/golang/go synced 2024-11-06 13:46:16 -07:00
go/src/pkg/exp/regexp
Russ Cox a1e7cd97d5 exp/regexp: implement regexp API using exp/regexp/syntax
Still need to write tests for new syntax
and fix bugs that the tests find, but this
is a good check point.

All tests pass.

Compared against existing regexp:

benchmark                                old ns/op    new ns/op    delta
regexp.BenchmarkLiteral                       1869          620  -66.83%
regexp.BenchmarkNotLiteral                    9489         7823  -17.56%
regexp.BenchmarkMatchClass                   10372         8386  -19.15%
regexp.BenchmarkMatchClass_InRange           10800         7750  -28.24%
regexp.BenchmarkReplaceAll                   13492         8519  -36.86%
regexp.BenchmarkAnchoredLiteralShortNonMatch   747          339  -54.62%
regexp.BenchmarkAnchoredLiteralLongNonMatch    599          335  -44.07%
regexp.BenchmarkAnchoredShortMatch            2137          917  -57.09%
regexp.BenchmarkAnchoredLongMatch             2029          917  -54.81%

R=r, r
CC=golang-dev, sam.thorogood
https://golang.org/cl/4820046
2011-07-24 17:00:28 -04:00
..
syntax exp/regexp: implement regexp API using exp/regexp/syntax 2011-07-24 17:00:28 -04:00
all_test.go exp/regexp: implement regexp API using exp/regexp/syntax 2011-07-24 17:00:28 -04:00
exec.go exp/regexp: implement regexp API using exp/regexp/syntax 2011-07-24 17:00:28 -04:00
find_test.go exp/regexp: implement regexp API using exp/regexp/syntax 2011-07-24 17:00:28 -04:00
Makefile exp/regexp: implement regexp API using exp/regexp/syntax 2011-07-24 17:00:28 -04:00
regexp.go exp/regexp: implement regexp API using exp/regexp/syntax 2011-07-24 17:00:28 -04:00