Please sign in to comment.
Improve encoding performance by 50%.
Our use of unsafeIndex was slow because we were deconstructing the PS constructor of "digits" on every iteration through the inner loop. Boo! By manually allocating a Ptr and marking it as strict, we can get GHC to hoist the case analysis of the Ptr constructor to the outside of the loop, and thereby win.
- Loading branch information...