Debian Codegraph @

src/algo/indexbyte2_arm64.go

raw
1 //go:build arm64
2
3 package algo
4
5 // indexByteTwo returns the index of the first occurrence of b1 or b2 in s,
6 // or -1 if neither is present. Implemented in assembly using ARM64 NEON
7 // to search for both bytes in a single pass.
8 //
9 //go:noescape
10 func IndexByteTwo(s []byte, b1, b2 byte) int
11
12 // lastIndexByteTwo returns the index of the last occurrence of b1 or b2 in s,
13 // or -1 if neither is present. Implemented in assembly using ARM64 NEON,
14 // scanning backward.
15 //
16 //go:noescape
17 func lastIndexByteTwo(s []byte, b1, b2 byte) int