> In summary: by moving from maps to arrays. That may seem like an awfully pedestrian observation, but it certainly wasn’t obvious to us at the outset that this was the crux of the problem!
How is this not your first thought !?!? Why would you even build it on maps? (at least trees I hope, please dont say hashes, I'll die a little inside if you do.)