z

package
v0.0.0-...-fe485d4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUTicks

func CPUTicks() int64

CPUTicks is a faster alternative to NanoTime to measure time duration.

func FastRand

func FastRand() uint32

FastRand is a fast thread local random function.

func MemHash

func MemHash(data []byte) uint64

MemHash is the hash function used by go map, it utilizes available hardware instructions(behaves as aeshash if aes instruction is available). NOTE: The hash seed changes for every process. So, this cannot be used as a persistent hash.

func MemHashString

func MemHashString(str string) uint64

MemHashString is the hash function used by go map, it utilizes available hardware instructions (behaves as aeshash if aes instruction is available). NOTE: The hash seed changes for every process. So, this cannot be used as a persistent hash.

func MemHashUint64

func MemHashUint64(val uint64) uint64

MemHashUint64 uses the aeshash given by the golang runtime.

func Memequal

func Memequal(a, b unsafe.Pointer, size uintptr) bool

func Memhash

func Memhash(p unsafe.Pointer, h, s uintptr) uintptr

func NanoTime

func NanoTime() int64

NanoTime returns the current time in nanoseconds from a monotonic clock.

Types

type StringStruct

type StringStruct struct {
	Str unsafe.Pointer
	Len int
}

Jump to

Keyboard shortcuts

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