- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for benchmarkSingleString (0.25 sec)
-
src/strings/replace_test.go
htmlUnescaper.Replace(str) } } func benchmarkSingleString(b *testing.B, pattern, text string) { r := NewReplacer(pattern, "[match]") b.SetBytes(int64(len(text))) b.ResetTimer() for i := 0; i < b.N; i++ { r.Replace(text) } } func BenchmarkSingleMaxSkipping(b *testing.B) { benchmarkSingleString(b, Repeat("b", 25), Repeat("a", 10000)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 22:53:05 UTC 2017 - 14.1K bytes - Viewed (0)