Update to current version of Go library (revision 94d654be2064).
From-SVN: r171076
This commit is contained in:
parent
f617201f55
commit
5133f00ef8
293 changed files with 16312 additions and 4920 deletions
|
@ -316,9 +316,9 @@ func TestNumSubexp(t *testing.T) {
|
|||
}
|
||||
|
||||
func BenchmarkLiteral(b *testing.B) {
|
||||
x := strings.Repeat("x", 50)
|
||||
x := strings.Repeat("x", 50) + "y"
|
||||
b.StopTimer()
|
||||
re := MustCompile(x)
|
||||
re := MustCompile("y")
|
||||
b.StartTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
if !re.MatchString(x) {
|
||||
|
@ -329,9 +329,9 @@ func BenchmarkLiteral(b *testing.B) {
|
|||
}
|
||||
|
||||
func BenchmarkNotLiteral(b *testing.B) {
|
||||
x := strings.Repeat("x", 49)
|
||||
x := strings.Repeat("x", 50) + "y"
|
||||
b.StopTimer()
|
||||
re := MustCompile("^" + x)
|
||||
re := MustCompile(".y")
|
||||
b.StartTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
if !re.MatchString(x) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue