Documentation
¶
Index ¶
Constants ¶
View Source
const ( BytePageSize = 1 << 14 // 16KB BytePageMask = BytePageSize - 1 Int64PageSize = BytePageSize >> 6 Int64PageMask = Int64PageSize - 1 )
View Source
const ( DefaultCapacity int64 = 2 << 10 DefaultMaxLoadFactor = 0.5 )
Variables ¶
View Source
var BytePageShift = util.NumberOfTrailingZeros(BytePageSize)
Functions ¶
This section is empty.
Types ¶
type ByteDoubleArray ¶
type ByteDoubleArray []ByteArray
type Int64DoubleArray ¶
type Int64DoubleArray []Int64Array
type IntHashMap ¶
type IntHashMap struct {
// contains filtered or unexported fields
}
func DefaultIntHashMap ¶
func DefaultIntHashMap() *IntHashMap
func NewIntHashMap ¶
func NewIntHashMap(capacity int64, maxLoadFactor float64, hashFunc func(int64) uint64) *IntHashMap
func (*IntHashMap) Clear ¶
func (m *IntHashMap) Clear()
clear resets the IntHashMap to its initial empty state while preserving capacity and load factor for memory reuse. This allows efficient reuse of allocated memory instead of creating new IntHashMaps repeatedly.
Fields that are reset: - hashmap - keys: all key data cleared
func (*IntHashMap) Get ¶
func (m *IntHashMap) Get(id uint64) int64
func (*IntHashMap) Set ¶
func (m *IntHashMap) Set(key int64) uint64
type StringHashMap ¶
type StringHashMap struct {
// contains filtered or unexported fields
}
func DefaultStringHashMap ¶
func DefaultStringHashMap() *StringHashMap
func NewStringHashMap ¶
func NewStringHashMap(capacity int64, maxLoadFactor float64, hashFunc func([]byte) uint64) *StringHashMap
func (*StringHashMap) Check ¶ added in v1.5.0
func (m *StringHashMap) Check(key []byte) (uint64, bool)
func (*StringHashMap) Clear ¶
func (m *StringHashMap) Clear()
clear resets the StringHashMap to its initial empty state while preserving capacity and load factor for memory reuse. This allows efficient reuse of allocated memory instead of creating new StringHashMaps repeatedly.
Fields that are reset: - hashmap - keys: all key data cleared - startOffsets: all start offsets reset
func (*StringHashMap) Set ¶
func (m *StringHashMap) Set(key []byte) uint64
Click to show internal directories.
Click to hide internal directories.