Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllZero ¶
AllZero reports whether b consists entirely of zero bytes. This simple version is on-par with the assembly, so typically we prefer it for portability.
func AllZeroSIMD ¶
AllZeroSIMD reports whether b consists entirely of zero bytes. It uses assembly, which may or may not be faster.
func LongestZeroSpan ¶
LongestZeroSpan is a simple byte-by-byte implementation for benchmarking. This naive version is on par with the SIMD version above. To see on your machine, run: go test -bench=. -benchmem
func SIMDLongestZeroSpan ¶
LongestZeroSpan returns the start index and length of the longest continuous span of zero bytes in the given slice. If no zeros are found, returns (0, 0). If multiple spans of the same longest length exist, returns the first one.
Types ¶
This section is empty.