summaryrefslogtreecommitdiff
path: root/src/pkg/regexp/regexp.go
AgeCommit message (Collapse)AuthorFilesLines
2009-11-19add a match arena to regexp to avoid generating garbage.Rob Pike1-46/+106
simple regexps run 20x faster. the regex-dna benchmark goes 3x faster. R=rsc CC=golang-dev http://codereview.appspot.com/156108
2009-11-19two easy optimizations for regexp:Rob Pike1-13/+78
1) if char class contains a single character, make it a single character. (this is used to quote, e.g. [.] rather than \. 2) if regexp begins with ordinary text substring, use plain string match to start engine R=rsc CC=golang-dev http://codereview.appspot.com/157095
2009-11-18remove bytes.CopyRob Pike1-15/+7
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-14move evaluation of null-matching instructions one iteration earlier.Rob Pike1-31/+47
performance hit of about 20% but more intuitive results for submatches. we need a good regexp package at some point. Fixes issue 110. R=rsc CC=golang-dev http://codereview.appspot.com/152131
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-22/+22
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-71/+71
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-93/+31
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt'ed missing regexp fileRobert Griesemer1-137/+187
(one-line functions will be re-established once we have all formatted uniformly) R=r http://go/go-review/1023004
2009-11-05manual fix for better gofmt resultRobert Griesemer1-2/+1
R=r http://go/go-review/1019005
2009-11-04panic can't print interfaces well so use err.String()Rob Pike1-1/+1
R=rsc http://go/go-review/1016041
2009-11-02eliminate goroutine from testing/regexp too.Rob Pike1-2/+2
R=rsc CC=go-dev http://go/go-review/1018021
2009-11-02take goroutines out of regexp so they can be createdRob Pike1-53/+77
during initialization. R=rsc CC=go-dev http://go/go-review/1016023
2009-09-17use buf.String() instead of string(buf.Bytes())Rob Pike1-1/+1
use strings.Buffer instead of bytes.Buffer in some places R=rsc DELTA=40 (0 added, 3 deleted, 37 changed) OCL=34770 CL=34775
2009-09-16rename bytes.Buffer.Data() to bytes.Buffer.Bytes()Rob Pike1-2/+2
R=rsc DELTA=152 (6 added, 0 deleted, 146 changed) OCL=34695 CL=34701
2009-09-15more "declared and not used".Russ Cox1-2/+2
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox1-3/+3
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-08-26generate the unicode tables directly from web databaseRob Pike1-1/+1
after this CL, two more to come: 1) add an exhaustive test, probably as a variant of maketables 2) add ToUpper, ToLower, ToTitle and associated tests R=rsc DELTA=1578 (1007 added, 559 deleted, 12 changed) OCL=33902 CL=33907
2009-08-12convert non-low-level non-google pkg codeRuss Cox1-2/+0
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-09Add methods AllMatches, AllMatchesString, AllMatchesIter,Stephen Ma1-0/+119
AllMatchesStringIter, based on sawn and sawzall functions in sawzall. APPROVED=rsc DELTA=218 (218 added, 0 deleted, 0 changed) OCL=32408 CL=32949
2009-08-05support []byte (more efficient) as well as string in the interfaces.Rob Pike1-19/+122
change the names; Match is for []byte and MatchString is for string, etc. R=rsc DELTA=195 (155 added, 0 deleted, 40 changed) OCL=32800 CL=32800
2009-08-05special case: recognize '[^\n]' and make it as fast as '.'Rob Pike1-2/+22
R=rsc DELTA=25 (23 added, 1 deleted, 1 changed) OCL=32793 CL=32799
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-1/+2
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-18Add a ReplaceAll method to Regexp.Steve Newman1-1/+66
APPROVED=r,rsc DELTA=189 (187 added, 0 deleted, 2 changed) OCL=30205 CL=30517
2009-06-09mv src/lib to src/pkgRob Pike1-0/+764
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102