What I remember from the first implementation is that typed array accesses are more expensive than bit-shift operations. maybe it's worth a try loading the _dict into a Uint16Array, or also a Uint32Array and see how we perform.