hashtable

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MB = 1 << 20
)

Variables

View Source
var (
	Int64BatchHash                  = wyhashInt64Batch
	Int64HashWithFixedSeed          = wyhash64WithFixedSeed
	BytesBatchGenHashStates         = wyhashBytesBatch
	BytesBatchGenHashStatesWithSeed = wyhashBytesBatchWithSeed
	Int192BatchGenHashStates        = wyhashInt192Batch
	Int256BatchGenHashStates        = wyhashInt256Batch
	Int320BatchGenHashStates        = wyhashInt320Batch
)
View Source
var DefaultAllocator = sync.OnceValue(func() malloc.Allocator {
	return newAllocator()
})
View Source
var StrKeyPadding [16]byte

Functions

This section is empty.

Types

type FixedMap

type FixedMap struct {
	// contains filtered or unexported fields
}

func (*FixedMap) Cardinality

func (ht *FixedMap) Cardinality() uint64

func (*FixedMap) Cells

func (ht *FixedMap) Cells() []uint64

func (*FixedMap) Init

func (ht *FixedMap) Init(cellCnt uint32)

func (*FixedMap) Insert

func (ht *FixedMap) Insert(key uint32) uint64

type FixedMapIterator

type FixedMapIterator struct {
	// contains filtered or unexported fields
}

func (*FixedMapIterator) Init

func (it *FixedMapIterator) Init(ht *FixedMap)

func (*FixedMapIterator) Next

func (it *FixedMapIterator) Next() (key uint32, value uint64, err error)

type FixedSet

type FixedSet struct {
	// contains filtered or unexported fields
}

func (*FixedSet) Cardinality

func (ht *FixedSet) Cardinality() (cnt uint64)

func (*FixedSet) Init

func (ht *FixedSet) Init(cellCnt uint32)

func (*FixedSet) Insert

func (ht *FixedSet) Insert(key uint32) (inserted bool)

func (*FixedSet) Merge

func (ht *FixedSet) Merge(other *FixedSet)

type FixedSetIterator

type FixedSetIterator struct {
	// contains filtered or unexported fields
}

func (*FixedSetIterator) Init

func (it *FixedSetIterator) Init(ht *FixedSet)

func (*FixedSetIterator) Next

func (it *FixedSetIterator) Next() (key uint32, err error)

type Int64HashMap

type Int64HashMap struct {
	// contains filtered or unexported fields
}

func (*Int64HashMap) Cardinality

func (ht *Int64HashMap) Cardinality() uint64

func (*Int64HashMap) FillGroupHashes

func (ht *Int64HashMap) FillGroupHashes(dst []uint64) []uint64

func (*Int64HashMap) FindBatch

func (ht *Int64HashMap) FindBatch(n int, hashes []uint64, keysPtr unsafe.Pointer, values []uint64)

func (*Int64HashMap) Free added in v0.6.0

func (ht *Int64HashMap) Free()

func (*Int64HashMap) Init

func (ht *Int64HashMap) Init(mp *mpool.MPool) (err error)

func (*Int64HashMap) InsertBatch

func (ht *Int64HashMap) InsertBatch(n int, hashes []uint64, keysPtr unsafe.Pointer, values []uint64) error

func (*Int64HashMap) InsertBatchWithRing

func (ht *Int64HashMap) InsertBatchWithRing(n int, zValues []int64, hashes []uint64, keysPtr unsafe.Pointer, values []uint64) error

func (*Int64HashMap) MarshalBinary

func (ht *Int64HashMap) MarshalBinary() ([]byte, error)

func (*Int64HashMap) ResizeOnDemand added in v1.0.0

func (ht *Int64HashMap) ResizeOnDemand(cnt int) error

func (*Int64HashMap) Size added in v0.7.0

func (ht *Int64HashMap) Size() int64

func (*Int64HashMap) UnmarshalBinary

func (ht *Int64HashMap) UnmarshalBinary(data []byte, mp *mpool.MPool) error

func (*Int64HashMap) UnmarshalFrom

func (ht *Int64HashMap) UnmarshalFrom(r io.Reader, mp *mpool.MPool) (n int64, err error)

func (*Int64HashMap) WriteTo

func (ht *Int64HashMap) WriteTo(w io.Writer) (n int64, err error)

type Int64HashMapCell

type Int64HashMapCell struct {
	Key    uint64
	Mapped uint64
}

type Int64HashMapIterator

type Int64HashMapIterator struct {
	// contains filtered or unexported fields
}

func (*Int64HashMapIterator) Init

func (it *Int64HashMapIterator) Init(ht *Int64HashMap)

func (*Int64HashMapIterator) Next

func (it *Int64HashMapIterator) Next() (cell *Int64HashMapCell, err error)

type StringHashMap

type StringHashMap struct {
	// contains filtered or unexported fields
}

func (*StringHashMap) FillGroupHashes

func (ht *StringHashMap) FillGroupHashes(dst []uint64) []uint64

func (*StringHashMap) FindStringBatch

func (ht *StringHashMap) FindStringBatch(states [][3]uint64, keys [][]byte, values []uint64)

func (*StringHashMap) Free added in v0.6.0

func (ht *StringHashMap) Free()

func (*StringHashMap) Init

func (ht *StringHashMap) Init(mp *mpool.MPool) (err error)

func (*StringHashMap) InsertStringBatch

func (ht *StringHashMap) InsertStringBatch(states [][3]uint64, keys [][]byte, values []uint64) error

func (*StringHashMap) InsertStringBatchWithRing

func (ht *StringHashMap) InsertStringBatchWithRing(zValues []int64, states [][3]uint64, keys [][]byte, values []uint64) error

func (*StringHashMap) MarshalBinary

func (ht *StringHashMap) MarshalBinary() ([]byte, error)

func (*StringHashMap) ResizeOnDemand added in v1.0.0

func (ht *StringHashMap) ResizeOnDemand(n uint64) error

func (*StringHashMap) Size added in v0.7.0

func (ht *StringHashMap) Size() int64

func (*StringHashMap) UnmarshalBinary

func (ht *StringHashMap) UnmarshalBinary(data []byte, mp *mpool.MPool) error

func (*StringHashMap) UnmarshalFrom

func (ht *StringHashMap) UnmarshalFrom(r io.Reader, mp *mpool.MPool) (n int64, err error)

func (*StringHashMap) WriteTo

func (ht *StringHashMap) WriteTo(w io.Writer) (n int64, err error)

type StringHashMapCell

type StringHashMapCell struct {
	HashState [3]uint64
	Mapped    uint64
}

type StringHashMapIterator

type StringHashMapIterator struct {
	// contains filtered or unexported fields
}

func (*StringHashMapIterator) Init

func (it *StringHashMapIterator) Init(ht *StringHashMap)

func (*StringHashMapIterator) Next

func (it *StringHashMapIterator) Next() (cell *StringHashMapCell, err error)

type StringRef

type StringRef struct {
	Ptr *byte
	Len int
}

Jump to

Keyboard shortcuts

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