Since bitWidth and the map length work with power of twos, we can use
shifts and trailing zero bit counts in lower-level languages like Go.
Those are much, much simpler and faster than float-based math.Pow and
math.Log2.
This was implemented in go-ipld-adl-hamt, and Rod suggested we include
this hint in the spec.
Since bitWidth and the map length work with power of twos, we can use shifts and trailing zero bit counts in lower-level languages like Go. Those are much, much simpler and faster than float-based math.Pow and math.Log2.
This was implemented in go-ipld-adl-hamt, and Rod suggested we include this hint in the spec.