keyset

package
Version: v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

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

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

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL