MCPcopy Create free account

hub / github.com/cockroachdb/swiss / functions

Functions113 in github.com/cockroachdb/swiss

↓ 57 callersMethodAt
(i uint32)
map.go:1585
↓ 38 callersFunctionbenchSizes
( f func(b *testing.B, n int, genKeys func(start, end int) []T), genKeys func(start, end int) []T, )
bench_test.go:117
↓ 22 callersMethodPut
Put inserts an entry into the map, overwriting an existing value if an entry with the same key already exists.
map.go:415
↓ 19 callersMethodGet
Get retrieves the value from the map for the specified key, returning ok=false if the key is not present.
map.go:519
↓ 17 callersFunctiongenKeys
(start, end int)
bench_test.go:143
↓ 14 callersMethodcheckInvariants
checkInvariants verifies the internal consistency of the map's structure, checking conditions that should always be true for a correctly functioning m
map.go:956
↓ 14 callersMethodglobalDepth
globalDepth returns the number of bits from the top of the hash to use for indexing in the buckets directory.
map.go:864
↓ 12 callersMethodLen
Len returns the number of entries in the map.
map.go:716
↓ 11 callersMethodSet
Set sets the i-th control byte.
endian_big.go:31
↓ 10 callersMethodfirst
first assumes that only the MSB of each control byte can be set (e.g. bitset is the result of matchEmpty or similar) and returns the relative index of
map.go:1449
↓ 10 callersFunctionh2
Extracts the H2 portion of a hash: the 7 bits not used for h1. These are used as an occupied control byte.
map.go:1641
↓ 8 callersMethodbucketCount
bucketCount returns the number of buckets in the buckets directory.
map.go:872
↓ 8 callersMethodbuckets
buckets calls yield sequentially for each bucket in the map. If yield returns false, iteration stops. Offset specifies the bucket to start iteration a
map.go:762
↓ 8 callersFunctionnoescape
noescape hides a pointer from escape analysis. noescape is the identity function but escape analysis doesn't think the output depends on the input.
map.go:1653
↓ 7 callersMethodAll
All calls yield sequentially for each key and value present in the map. If yield returns false, range stops the iteration. The map can be mutated duri
map.go:667
↓ 7 callersFunctionNew
New constructs a new Map with the specified initial capacity. If initialCapacity is 0 the map will start out with zero capacity and will grow on the f
map.go:322
↓ 7 callersFunctionh1
Extracts the H1 portion of a hash: the 57 upper bits.
map.go:1634
↓ 7 callersFunctionmakeProbeSeq
(hash uintptr, mask uint32)
map.go:1615
↓ 7 callersMethodmatchEmpty
matchEmpty returns the set of slots in the group that are empty.
map.go:1506
↓ 7 callersMethodnext
()
map.go:1623
↓ 6 callersMethodtoBuiltinMap
toBuiltinMap returns the elements as a map[K]V. Useful for testing.
map_test.go:42
↓ 5 callersMethodDelete
Delete deletes the entry corresponding to the specified key from the map. It is a noop to delete a non-existent key.
map.go:576
↓ 5 callersMethodSlice
Slice returns a Go slice akin to slice[start:end] for a Go builtin slice.
map.go:1683
↓ 5 callersFunctionmakeUnsafeSlice
(s []T)
map.go:1664
↓ 5 callersMethodremoveFirst
removeFirst removes the first set bit (that is, resets the least significant set bit to 0).
map.go:1454
↓ 5 callersMethodresize
resize the capacity of the table by allocating a bigger array and uncheckedPutting each element of the table into the new array (we know that no inser
map.go:1087
↓ 4 callersFunctionbucketStep
bucketStep is the number of buckets to step over in the buckets directory to reach the next different bucket. A bucket occupies 1 or more contiguous e
map.go:882
↓ 4 callersMethodcapacity
capacity returns the total capacity of all map buckets.
map.go:721
↓ 4 callersFunctionfastrand64
go:linkname fastrand64 runtime.fastrand64
runtime_go1.20.go:32
↓ 4 callersMethodinit
(m *Map[K, V], newCapacity uint32)
map.go:1062
↓ 4 callersMethodinstallBucket
installBucket installs a bucket into the buckets directory, overwriting every index in the range of entries the bucket occupies.
map.go:897
↓ 4 callersMethodmatchEmptyOrDeleted
matchEmptyOrDeleted returns the set of slots in the group that are empty or deleted.
map.go:1519
↓ 4 callersMethodmatchH2
matchH2 returns the set of slots which are full and for which the 7-bit hash matches the given value. May return false positives.
map.go:1492
↓ 4 callersFunctionunsafeCtrlGroup
TODO(peter): - Add metamorphic tests that cross-check behavior at various bucket sizes. - Add fuzz testing. unsafeCtrlGroup reintreprets the given sli
map_test.go:37
↓ 3 callersMethodInit
Init initializes a Map with the specified initial capacity. If initialCapacity is 0 the map will start out with zero capacity and will grow on the fir
map.go:335
↓ 3 callersMethodString
()
map.go:1458
↓ 3 callersMethodclose
(allocator Allocator[K, V])
map.go:984
↓ 3 callersMethodmutableBucket
(h uintptr)
map.go:743
↓ 3 callersMethodrandElement
TODO(peter): Extracting a random element might be generally useful. Should this be promoted to the public API? Note that the elements are not selected
map_test.go:55
↓ 3 callersMethodrehashInPlace
(m *Map[K, V])
map.go:1242
↓ 3 callersMethodresetGrowthLeft
()
map.go:1331
↓ 3 callersMethodtombstones
tombstones returns the number of deleted (tombstone) entries in the bucket. A tombstone is a slot that has been deleted but is still considered occupi
map.go:997
↓ 3 callersMethoduncheckedPut
uncheckedPut inserts an entry known not to be in the table. Used by Put after it has failed to find an existing entry to overwrite duration insertion.
map.go:1004
↓ 2 callersMethodClear
Clear deletes all entries from the map resulting in an empty map.
map.go:631
↓ 2 callersMethodFree
Free can optionally release the memory associated with the supplied slice that is guaranteed to have been allocated by Alloc.
options.go:66
↓ 2 callersMethodSetEmpty
SetEmpty sets all the control bytes to empty.
map.go:1486
↓ 2 callersFunctionadjustBucketIndex
adjustBucketIndex adjusts the index of a bucket to account for the growth of the directory where index was captured at originalGlobalDepth and we're c
map.go:891
↓ 2 callersMethodconvertNonFullToEmptyAndFullToDeleted
convertNonFullToEmptyAndFullToDeleted converts deleted control bytes in a group to empty control bytes, and control bytes indicating full slots to del
map.go:1532
↓ 2 callersMethodgoFormat
(w io.Writer)
map.go:1417
↓ 2 callersMethodgrowDirectory
growDirectory grows the directory slice to 1<<newGlobalDepth buckets. Grow directory returns the new index location for the bucket specified by index.
map.go:907
↓ 2 callersFunctionnormalizeCapacity
normalizeCapacity rounds capacity to the next power of 2.
map.go:315
↓ 2 callersMethodsplit
split divides the entries in a bucket between the receiver and a new bucket of the same size, and then installs the new bucket into the buckets direct
map.go:1121
↓ 1 callersMethodAlloc
Alloc should return a slice equivalent to make([]Group, n).
options.go:62
↓ 1 callersMethodClose
Close closes the map, releasing any memory back to its configured allocator. It is unnecessary to close a map using the default allocator. It is inval
map.go:404
↓ 1 callersMethodGet
Get returns the i-th control byte.
endian_big.go:25
↓ 1 callersMethodapply
(m *Map[K, V])
options.go:22
↓ 1 callersMethodbucket
bucket returns the bucket corresponding to hash value h.
map.go:731
↓ 1 callersMethodfullGroups
TODO(peter): Should this be removed? It was useful for debugging a performance problem with BenchmarkGetMiss.
map.go:1349
↓ 1 callersMethodrehash
(m *Map[K, V])
map.go:1031
MethodAlloc
(n int)
options.go:71
MethodAlloc
(n int)
map_test.go:459
MethodAt
At returns a pointer to the element at index i. The go:nocheckptr declaration is need to silence the runtime check in race builds that the memory for
map.go:1677
FunctionBenchmarkMapGetHit
(b *testing.B)
bench_test.go:35
FunctionBenchmarkMapGetMiss
(b *testing.B)
bench_test.go:48
FunctionBenchmarkMapIter
(b *testing.B)
bench_test.go:26
FunctionBenchmarkMapPutDelete
(b *testing.B)
bench_test.go:100
FunctionBenchmarkMapPutGrow
(b *testing.B)
bench_test.go:61
FunctionBenchmarkMapPutPreAllocate
(b *testing.B)
bench_test.go:74
FunctionBenchmarkMapPutReuse
(b *testing.B)
bench_test.go:87
MethodFree
(_ []Group[K, V])
options.go:75
MethodFree
(_ []Group[K, V])
map_test.go:464
MethodGet
Get returns the i-th control byte.
endian_little.go:25
MethodGoString
GoString implements the fmt.GoStringer interface which is used when formatting using the "%#v" format specifier.
map.go:704
MethodLock
Lock is a no-op used by -copylocks checker from `go vet`.
map.go:1710
MethodSet
Set sets the i-th control byte.
endian_little.go:30
MethodString
()
map.go:1556
MethodString
()
map.go:1629
FunctionTestAllocator
(t *testing.T)
map_test.go:468
FunctionTestBasic
(t *testing.T)
map_test.go:212
FunctionTestClear
(t *testing.T)
map_test.go:426
FunctionTestConvertNonFullToEmptyAndFullToDeleted
(t *testing.T)
map_test.go:163
FunctionTestDeleteAll
(t *testing.T)
map_test.go:371
FunctionTestInitialCapacity
(t *testing.T)
map_test.go:186
FunctionTestIterateDelete
(t *testing.T)
map_test.go:385
FunctionTestIterateMutate
(t *testing.T)
map_test.go:348
FunctionTestIterateTerminatesEarly
(t *testing.T)
map_test.go:408
FunctionTestMatchEmpty
(t *testing.T)
map_test.go:112
FunctionTestMatchEmptyOrDeleted
(t *testing.T)
map_test.go:138
FunctionTestMatchH2
(t *testing.T)
map_test.go:100
FunctionTestProbeSeq
(t *testing.T)
map_test.go:65
FunctionTestRandom
(t *testing.T)
map_test.go:287
FunctionTestResizeVsSplit
(t *testing.T)
map_test.go:487
MethodUnlock
()
map.go:1711
FunctionWithAllocator
WithAllocator is an option for specifying the Allocator to use for a Map[K,V].
options.go:87
FunctionWithHash
WithHash is an option to specify the hash function to use for a Map[K,V].
options.go:34
FunctionWithMaxBucketCapacity
WithMaxBucketCapacity is an option to specify the max bucket size to use for a Map[K,V]. Specifying a very large bucket size results in slower resize
options.go:49
Methodapply
(m *Map[K, V])
options.go:29
FunctionbenchmarkRuntimeMapGetHit
( b *testing.B, n int, genKeys func(start, end int) []T, )
bench_test.go:255
FunctionbenchmarkRuntimeMapGetMiss
( b *testing.B, n int, genKeys func(start, end int) []T, )
bench_test.go:206
FunctionbenchmarkRuntimeMapIter
(b *testing.B, n int, genKeys func(start, end int) []T)
bench_test.go:169
next →1–100 of 113, ranked by callers