summaryrefslogtreecommitdiff
path: root/src/regexp/exec_test.go
Commit message (Collapse)AuthorAgeFilesLines
* regexp: don't run slow benchmarks on race buildersBrad Fitzpatrick2016-09-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Shave 6.5 minutes off the *-race build time. The *-race builders run: go test -short -race -run=^$ -benchtime=.1s -cpu=4 $PKG ... for each package with benchmarks. The point isn't to measure the speed of the packages, but rather to see if there are any races. (which is why a benchtime of 0.1 seconds is used) But running in race mode makes things slower and our benchmarks aren't all very fast to begin with. The regexp benchmarks in race were taking over 6.5 minutes. With this CL, it's now 8 seconds. Updates #17104 Change-Id: I054528d09b1568d37aac9f9b515d6ed90a5cf5b0 Reviewed-on: https://go-review.googlesource.com/29156 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
* regexp: use Run for benchmarkMarcel van Lohuizen2016-06-011-46/+31
| | | | | | | Change-Id: I4d19e3221d3789d4c460b421b2d1484253778068 Reviewed-on: https://go-review.googlesource.com/23429 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
* regexp: add a harder regexp to the benchmarksMichael Matloob2016-04-271-0/+6
| | | | | | | | | | This regexp has many parallel alternations Change-Id: I8044f460aa7d18f20cb0452e9470557b87facd6d Reviewed-on: https://go-review.googlesource.com/22471 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* unicode: improve SimpleFold performance for asciiEgon Elbre2016-04-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This change significantly speeds up case-insensitive regexp matching. benchmark old ns/op new ns/op delta BenchmarkMatchEasy0i_32-8 2690 1473 -45.24% BenchmarkMatchEasy0i_1K-8 80404 42269 -47.43% BenchmarkMatchEasy0i_32K-8 3272187 2076118 -36.55% BenchmarkMatchEasy0i_1M-8 104805990 66503805 -36.55% BenchmarkMatchEasy0i_32M-8 3360192200 2126121600 -36.73% benchmark old MB/s new MB/s speedup BenchmarkMatchEasy0i_32-8 11.90 21.72 1.83x BenchmarkMatchEasy0i_1K-8 12.74 24.23 1.90x BenchmarkMatchEasy0i_32K-8 10.01 15.78 1.58x BenchmarkMatchEasy0i_1M-8 10.00 15.77 1.58x BenchmarkMatchEasy0i_32M-8 9.99 15.78 1.58x Issue #13288 Change-Id: I94af7bb29e75d60b4f6ee760124867ab271b9642 Reviewed-on: https://go-review.googlesource.com/16943 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: delete dead test codeDominik Honnef2016-03-211-2/+0
| | | | | | | | | | This deletes unused code and helpers from tests. Change-Id: Ie31d46115f558ceb8da6efbf90c3c204e03b0d7e Reviewed-on: https://go-review.googlesource.com/20927 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: single space after period.Brad Fitzpatrick2016-03-021-7/+7
| | | | | | | | | | | | | | | | | | | | The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: fix typos and spellingMartin Möhrmann2016-02-241-1/+1
| | | | | | | | Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913 Reviewed-on: https://go-review.googlesource.com/19829 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* regexp: small correction to test commentMichael Matloob2015-06-141-1/+1
| | | | | | | | s/Backtrace/Backtrack/ Change-Id: I062aab18f23f2bc2110cf7210c2e7264747e02cf Reviewed-on: https://go-review.googlesource.com/11091 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* regexp: trivial change in comments to update code.google.com linkDmitry Savintsev2015-04-271-4/+4
| | | | | | | | | | Replaced code.google.com/p/re2/ with github.com/google/re2/ and updated the file names (re2-exhaustive.txt.bz2 not re2.txt.gz) as well as the re2 make command (make log). Change-Id: I15937b0b8a898d78d45366857ed86421c8d69960 Reviewed-on: https://go-review.googlesource.com/9372 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* regexp: skip backtracker for long programsMatthew Brennan2015-04-091-0/+12
| | | | | | | | | | | | This update makes maxBacktrackLen return 0 if len(prog.Inst) > maxBacktrackProg. This prevents an attempt to backtrack against a nil bitstate. Fixes #10319 Change-Id: Icdbeb2392782ccf66f9d0a70ea57af22fb93f01b Reviewed-on: https://go-review.googlesource.com/8473 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* regexp: update URLs in testsShenghou Ma2015-01-261-2/+2
| | | | | | Change-Id: I06035d949272157bbb7255563b37ac93cbf07f15 Reviewed-on: https://go-review.googlesource.com/3272 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+715
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.