- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkLiteral (0.52 sec)
-
src/regexp/all_test.go
b.Fatalf("FindStringSubmatch(%q)[0] = %q; want %q", s, subs[0], wantSubs) } if subs[1] != "aab" { b.Fatalf("FindStringSubmatch(%q)[1] = %q; want %q", s, subs[1], "aab") } } } func BenchmarkLiteral(b *testing.B) { x := strings.Repeat("x", 50) + "y" b.StopTimer() re := MustCompile("y") b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { b.Fatalf("no match!") } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 25.8K bytes - Viewed (0)