MCPcopy Create free account
hub / github.com/egonelbre/exp / PackNybble

Function PackNybble

permutation/code.go:273–279  ·  view source on GitHub ↗
(perm [base]byte)

Source from the content-addressed store, hash-verified

271}
272
273func PackNybble(perm [base]byte) int {
274 r := 0
275 for _, v := range perm {
276 r = r<<4 + int(v)
277 }
278 return r
279}
280
281func PackTight(perm [base]byte) int {
282 r := 0

Callers 1

BenchmarkPackNybbleFunction · 0.85

Calls

no outgoing calls

Tested by 1

BenchmarkPackNybbleFunction · 0.68