Skip to content
Myr

indexbyte2_arm64.go

This file

Path

src/algo/indexbyte2_arm64.go

17 lines · 531 bytes · Go

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 76efddd point at it.

bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd

lines 1–17why, one step back
1//go:build arm64
23package 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