fnv

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2017 License: MIT Imports: 0 Imported by: 5

README

GoDoc

fnv

Package fnv implements allocation-free 32 and 64 bit FNV-1 hash variants.

% go test -bench=. -benchmem
BenchmarkHash32a-4      300000000                4.85 ns/op            0 B/op          0 allocs/op
BenchmarkHash32-4       300000000                4.78 ns/op            0 B/op          0 allocs/op
BenchmarkHash64a-4      300000000                6.01 ns/op            0 B/op          0 allocs/op
BenchmarkHash64-4       300000000                5.18 ns/op            0 B/op          0 allocs/op

Documentation

Overview

Package fnv implements allocation-free 32 and 64 bit FNV-1 hash variants.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash32

func Hash32(s string) uint32

Hash32 takes a string and returns a 32 bit FNV-1.

func Hash32a

func Hash32a(s string) uint32

Hash32a takes a string and returns a 32 bit FNV-1a.

func Hash64

func Hash64(s string) uint64

Hash64 takes a string and returns a 64 bit FNV-1.

func Hash64a

func Hash64a(s string) uint64

Hash64a takes a string and returns a 64 bit FNV-1a.

Types

This section is empty.

Jump to

Keyboard shortcuts

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