Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Effect-TS/effect
/ nextPowerOfTwo
Function
nextPowerOfTwo
packages/effect/src/internal/stm/tMap.ts:51–54 ·
view source on GitHub ↗
(size: number)
Source
from the content-addressed store, hash-verified
49
50
/** @internal */
51
const
nextPowerOfTwo = (size: number): number => {
52
const
n = -1 >>> Math.clz32(size - 1)
53
return
n < 0 ? 1 : n + 1
54
}
55
56
/** @internal */
57
const
hash = <K>(key: K): number => {
Callers
1
fromIterable
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected