Oops, sorry. I did write ms, but meant seconds. Even 9ms would be too much, but 90ms would be crazy in a game.<p>Though megabytes of garbage are easy to &quot;achieve&quot; if you don&#x27;t pool objects, call functions with temporary objects as parameters or return values, etc. It really just depends on how much you do that way, which can easily be a way that works fine during execution, or even seems really elegant, but bites you in the ass at GC time. Especially since 60 frames a second doesn&#x27;t mean you&#x27;re not running some other loop for the logic more often than that, and it&#x27;s not like you ever have the full 16ms for rendering and logic either.<p>&quot;Silky smooth&quot; to me means no dropped frames, none, once the game loop is running and the JIT warmed up. A browser might never be able or willing to guarantee that, but even a few megabytes to GC every 10 seconds means a guaranteed hiccup. Yeah, you can&#x27;t avoid outside influences, but you can avoid your code dropping frames even in a vacuum. Nothing more, nothing less, and right now, for Javascript in browsers, that means knowing when to avoid GC among other things. As far as I can tell, and while I&#x27;d be happy to be proven wrong, I&#x27;m not sure anyone even honestly engaged with it, much less disproved it.<p>Say you have a game that might spawn and kill hundreds or thousands of enemies and&#x2F;or projectiles per frame, and those enemies are more than just a pair of coordinates. You simply can&#x27;t use something like <i>new&#x2F;delete</i> for that, period. If you haven&#x27;t even tried, be it in the context of game or something comparable, and dismiss what I say based on some notion of what I &quot;deserve&quot; or what one should criticize about a language (when I was simply talking about what you need to <i>do</i> today, to get a specific thing done in a specific environment), you&#x27;re really missing out.<p>The question (to me) isn&#x27;t what language should you use to make the most accessible kind of simple game, the question is how to get shit done in Javascript. I&#x27;d be happy to try something better before it gets adopted, but no, I won&#x27;t pour a lot of work into a game made with it, I might dabble and if I fall in love I might advertise it, but to lay a foundation I might be still using years later, that does need the adoption having taken place (past tense), not it being the objectively best idea.<p>I&#x27;m not &quot;complaining about GC&quot; either, I do prefer it to memory holes. But show me anyone writing seriously about making games with Javascript claiming you shouldn&#x27;t pool objects etc., or decent libraries that don&#x27;t do it for you. I&#x27;ll happily admit I don&#x27;t know much, but this one I laboured over and read about and experimented with more than enough (because I just couldn&#x27;t get rid of the hiccups, no matter how simple I made things) to be rather sure of what I said above. I know it&#x27;s off-topic, I know people might not care, I know it&#x27;s no great insight, but that doesn&#x27;t make it false. It was something that tripped me up and which made a huge difference to me, and it&#x27;s something I see very rarely discussed outside of people actually making games. That&#x27;s why I brought it up, hopefully those actually engaging in anything that might benefit from this will look into it, enjoy and you&#x27;re welcome.<p><a href="https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2013&#x2F;05&#x2F;optimizing-your-javascript-game-for-firefox-os&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2013&#x2F;05&#x2F;optimizing-your-javascript...</a><p>&gt; JavaScript can spoil us when it comes to memory management. We generally don’t need to worry about memory leaks or conservatively allocating memory. But if we’ve allocated too much and garbage collection occurs in the middle of a frame, that can take up valuable time and result in a visible drop in FPS.<p>And since as of yet there is no way to control when GC occurs, and no way to enforce it not taking longer than X ms, you <i>have</i> to know how to avoid it. It&#x27;s not that you always have to avoid it, but you do need to know how to, at least if you write a smooth game, a physics library etc., <i>anything</i> that runs for a while in a quick loop and does more than a handful things which should not drop frames when avoidable.