go-countlines/countlines_arm64.go
2021-11-15 17:01:21 -08:00

14 lines
256 B
Go

//go:build arm64 && !gccgo && !appengine
package countlines
func CountNewlines(s []byte) uint64 {
if len(s) == 0 {
return 0
}
return countNewlinesASM(&s[0], uint64(len(s)))
}
//go:noescape
func countNewlinesASM(src *byte, len uint64) (ret uint64)