package keyset
import "github.com/segmentio/asm/keyset"
Index ¶
Functions ¶
func Lookup ¶
Lookup searches for a key in a set of keys, returning its index if found. If the key cannot be found, the number of keys is returned.
func New ¶
New prepares a set of keys for use with Lookup.
An optimized routine is used if the processor supports AVX instructions and the maximum length of any of the keys is less than or equal to 16. If New returns nil, this indicates that an optimized routine is not available, and the caller should use a fallback.
Source Files ¶
- Version
- v1.2.0 (latest)
- Published
- Apr 27, 2022
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 10 hours ago –
Tools for package owners.