Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/valyala/bytebufferpool
/ index
Function
index
pool.go:139–151 ·
view source on GitHub ↗
(n int)
Source
from the content-addressed store, hash-verified
137
}
138
139
func
index(n int) int {
140
n--
141
n >>= minBitSize
142
idx := 0
143
for
n > 0 {
144
n >>= 1
145
idx++
146
}
147
if
idx >= steps {
148
idx = steps - 1
149
}
150
return
idx
151
}
Callers
2
Put
Method · 0.85
testIndex
Function · 0.85
Calls
no outgoing calls
Tested by
1
testIndex
Function · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…