Documentation
¶
Overview ¶
Package gcswiss is a GC friendly hash map that uses an Extensible hashing plus Swiss table design. It is very based on the newer Go standard library map and the cockroachdb implementation.
- It does not support deletes. - It uses a 32bit hash - It allocates memory outside of the Go heap.
At the bottom we have groups of 8 (maybe 16 later?) entries.
Above this we have tables, which are fixed-size hash tables containing groups.
Above that we have a directory, which is indexed by the top bits of the hash and points to tables. This is the extensible hashing part.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupLocation ¶
type GroupLocation[V any] struct { // contains filtered or unexported fields }
GroupLocation represents a location in the table for a specific key. The caller retrieves the location, then can use it to get or set the value. If the key did not exist, the caller must use Set to set the key and value.
func (GroupLocation[V]) Get ¶
func (gl GroupLocation[V]) Get() V
func (GroupLocation[V]) Set ¶
func (gl GroupLocation[V]) Set(key string, value V)
Set is used when the key was not previously present in the map.
func (GroupLocation[V]) SetValue ¶
func (gl GroupLocation[V]) SetValue(value V)