package keyset

import "github.com/segmentio/asm/keyset"

Index

Functions

func Lookup

func Lookup(keyset []byte, key []byte) int

func New

func New(keys [][]byte) []byte

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

keyset.go keyset_default.go

Version
v1.1.3
Published
Dec 8, 2021
Platform
js/wasm
Imports
4 packages
Last checked
2 hours ago

Tools for package owners.