- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for Harp (0.04 sec)
-
src/bytes/bytes.go
if haveFastIndex { if j := bytealg.Index(s[i-last:], b[:n]); j >= 0 { return i + j - last } } else { // If bytealg.Index is not available a brute force search is // ~1.5-3x faster than Rabin-Karp since n is small. c0 := b[last] c1 := b[last-1] // There are at least 2 chars to match loop: for ; i < len(s); i++ { if s[i] == c0 && s[i-1] == c1 { for k := 2; k < n; k++ {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0)