indexbyte2_arm64.go
This file
Path
src/algo/indexbyte2_arm64.go
17 lines · 531 bytes · Go
Last changed by
Not known.
History of this fileTake it
1//go:build arm6423package algo45// 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 NEON7// to search for both bytes in a single pass.8//9//go:noescape10func IndexByteTwo(s []byte, b1, b2 byte) int1112// 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:noescape17func lastIndexByteTwo(s []byte, b1, b2 byte) int