Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dustinxie/lockfree
/ functions
Functions
81 in github.com/dustinxie/lockfree
⨍
Functions
81
◇
Types & classes
12
↓ 14 callers
Method
Lock
call this before for k, v := range map
map.go:37
↓ 14 callers
Method
Unlock
call this after for k, v := range map
map.go:40
↓ 10 callers
Method
next
()
hashmap/hashNode.go:44
↓ 9 callers
Function
memhash
memhash computes the hash of 'size' bytes of memory at addr
hashmap/util.go:72
↓ 7 callers
Method
Get
v, ok := map[key]
map.go:28
↓ 7 callers
Function
isFence
(n *hashNode)
hashmap/hashNode.go:36
↓ 6 callers
Method
Deque
remove an item from the queue
queue.go:31
↓ 6 callers
Method
Len
length of stack
stack.go:25
↓ 6 callers
Method
Len
length of queue
queue.go:25
↓ 6 callers
Method
Pop
remove an item from the stack
stack.go:31
↓ 6 callers
Method
Set
map[key] = value
map.go:31
↓ 6 callers
Method
linkTo
(next *hashNode)
hashmap/hashNode.go:40
↓ 4 callers
Method
Len
len(map)
map.go:25
↓ 4 callers
Function
NewHashMap
NewHashMap creates a new hashmap
map.go:48
↓ 4 callers
Method
get
(key interface{}, hash uint64)
hashmap/bucket.go:40
↓ 4 callers
Method
hash
64-bit hash provides 2^32 collision-resistance, which suffices for most use-case
hashmap/util.go:31
↓ 3 callers
Method
Del
delete(map, key)
map.go:34
↓ 3 callers
Method
Enque
add an item to the queue
queue.go:28
↓ 3 callers
Method
Next
returns next <k, v> in the map
map.go:43
↓ 3 callers
Method
Push
add an item to the stack
stack.go:28
↓ 3 callers
Function
casAddr
(addr *unsafe.Pointer, expected, target unsafe.Pointer)
list/node.go:41
↓ 3 callers
Method
del
(node *hashNode)
hashmap/bucket.go:84
↓ 3 callers
Method
getBucket
(hash uint64)
hashmap/hmap.go:150
↓ 3 callers
Method
last
last return the last node in the bucket
hashmap/bucket.go:53
↓ 3 callers
Function
newBucket
(count uint32, hash uint64)
hashmap/bucket.go:29
↓ 3 callers
Method
pivot
pivot returns the node with hash < input, and number of such nodes
hashmap/bucket.go:113
↓ 3 callers
Method
search
search finds the position to insert or update the key
hashmap/bucket.go:98
↓ 3 callers
Method
upsert
(node *hashNode)
hashmap/bucket.go:62
↓ 3 callers
Method
value
()
list/node.go:29
↓ 3 callers
Method
value
()
hashmap/hashNode.go:48
↓ 2 callers
Function
New
New creates a new hashmap
hashmap/hmap.go:54
↓ 2 callers
Function
NewQueue
NewQueue creates a new queue
queue.go:36
↓ 2 callers
Function
NewQueue
NewQueue creates a new queue
list/queue.go:30
↓ 2 callers
Function
NewStack
NewStack creates a new stack
stack.go:39
↓ 2 callers
Function
NewStack
NewStack creates a new stack
list/stack.go:30
↓ 2 callers
Method
Peek
return (but not remove) the top item on the stack
stack.go:34
↓ 2 callers
Method
Sum64
()
hashmap/hmap.go:39
↓ 2 callers
Method
isOverflow
()
hashmap/hmap.go:101
↓ 2 callers
Method
isUnderflow
()
hashmap/hmap.go:120
↓ 2 callers
Function
newFence
()
hashmap/hashNode.go:32
↓ 2 callers
Method
next
()
list/node.go:33
↓ 2 callers
Method
split
split breaks the bucket at the given hash, and returns the new bucket
hashmap/bucket.go:127
↓ 1 callers
Function
BucketSizeOption
BucketSizeOption sets the average size of bucket
hashmap/hmap.go:47
↓ 1 callers
Method
casNext
(expected, target unsafe.Pointer)
list/node.go:37
↓ 1 callers
Method
casNext
(expected, target unsafe.Pointer)
hashmap/hashNode.go:52
↓ 1 callers
Method
casValue
(expected, target unsafe.Pointer)
hashmap/hashNode.go:56
↓ 1 callers
Method
expand
()
hashmap/hmap.go:157
↓ 1 callers
Method
info
()
hashmap/hmap.go:205
↓ 1 callers
Method
merge
merge merges 2 buckets into 1
hashmap/bucket.go:139
↓ 1 callers
Method
shrink
()
hashmap/hmap.go:181
Function
BenchmarkLockfreeHashMap
(b *testing.B)
map_test.go:53
Function
BenchmarkLockfreeQueue
(b *testing.B)
queue_test.go:55
Function
BenchmarkLockfreeStack
(b *testing.B)
stack_test.go:55
Function
BenchmarkMapAndRWMutex
(b *testing.B)
map_test.go:82
Function
BenchmarkQueueAndRWMutex
(b *testing.B)
queue_test.go:75
Function
BenchmarkStackAndRWMutex
(b *testing.B)
stack_test.go:75
Function
BenchmarkSyncMap
(b *testing.B)
map_test.go:118
Method
Del
(key interface{})
hashmap/hmap.go:105
Method
Deque
()
list/queue.go:57
Method
Enque
(v interface{})
list/queue.go:42
Method
Get
(key interface{})
hashmap/hmap.go:80
Method
Len
()
list/stack.go:37
Method
Len
()
list/queue.go:38
Method
Len
()
hashmap/hmap.go:76
Method
Lock
()
hashmap/hmap.go:125
Method
Next
()
hashmap/hmap.go:135
Method
Peek
()
list/stack.go:71
Method
Pop
()
list/stack.go:56
Method
Push
(v interface{})
list/stack.go:41
Method
Set
(key, value interface{})
hashmap/hmap.go:85
Method
Sum64
()
hashmap/util_test.go:68
Function
TestBucket
(t *testing.T)
hashmap/bucket_test.go:25
Function
TestHash
(t *testing.T)
hashmap/util_test.go:23
Function
TestHmap
(t *testing.T)
hashmap/hmap_test.go:23
Function
TestNewHashMap
(t *testing.T)
map_test.go:26
Function
TestNewQueue
(t *testing.T)
queue_test.go:25
Function
TestNewStack
(t *testing.T)
stack_test.go:25
Function
TestQueue
(t *testing.T)
list/queue_test.go:23
Function
TestStack
(t *testing.T)
list/stack_test.go:23
Method
Unlock
()
hashmap/hmap.go:131
Method
size
()
hashmap/bucket.go:36