been digging into snap performance for a month. lots of very deep diving into snap internals, and lots of flame graphs. i started this alongside a new snap project (some particularly nasty behaviour forced my hand) but i ended up continuing it by itself using my adofai project.
my result is massive performance gains from inlining all the custom blocks used in the draw loop, and a significant bonus from javascript.
safe optimizations are hashed and shouldn't break from snap updates.
the ball colors are wrong (disabling the filters allows a new fast path through image operations) but that should be easy enough to fix another time.
i wouldn't consider anything here complete but it's all taken long enough already so i figured i'd share.
questions are welcome, but i won't be responding to any questions or comments for some time, it's 1am and i badly need sleep. i'll answer everything in plenty of detail later.