Thank you for this, bookmarked this one. Going to be an awesome resource for slapping in the face to all those evangelists that chant "browser games are the future" because once you keep pressing down arrow and the screen is filled with rectangles it crawls to a stop at several thousand of them, while a similar implementation in native C++ using Unreal Engine 5 will not break a sweat even at dozens of millions on screen.
This is actually written in C++ and I compile it to a native executable during development, and yet it crawls to a stop exactly the same, so I'm afraid that that one's on me. :D
(It's an inefficiency related to the breakage particles and waits patiently on a big pile of other code TODOs at the moment.)
Nevertheless, I don't disagree with you on your general sentiment towards browser games, I like fast native executables as well.