New games every week!
JSE - Further Tweaks
5th October 2021  
I didn't even think about WASM, yesterday..

-=-=-

I think I'm trying to avoid having to rewrite a whole bunch of code.
Of course, at some point, that's probably going to happen, but for now it's all those little optimisations that I can figure out.

It seems that having a lot of "If" commands slows it down a little, so all of those "If (Debug>0)" events have been stripped away, with quite a decent increase in speed.
I'm now looking into all the other if's and seeing if I can optimise them any further.

Javascript really isn't like any other language I've used before. Syntactically it's similar enough, and the way different browsers handle the exact same code in different ways is more or less the same.

The biggest difference is how they all seem to manage their handling of the Javascript.
Most of the Chromium browsers will optimise on the fly, and you can usually see the moment where it manages it, if you run the "Optimisationalism 2" test. It usually runs at one speed for a little while, then goes "Whoosh" once it's finished optimising the javascript.
Opera tries to pre-optimise as best as it can, so usually runs full speed the second you start.
Firefox.. I don't know what the heck Firefox is doing, but it seems to be roughly somewhere in-between the two, and generally optimises just as well.

I'm now finding myself wondering how well they handle WASM.. Will each browser end up doing something differently?
I might have to test various little stress tests on everything I can find.

It doesn't help that, when I remote desktop to Windows and run Edge/Chrome/Opera/Firefox in that, then all the browsers run with a 30fps limit. Obviously due to Remote Desktop limiting the speed, but odd that the browsers aren't still running at 60fps.
Hmmm..
Makes for a very tricky amount of "is this faster, or isn't it?" optimising.

Views 51, Upvotes 0
Dailyblog , Jse , Waffle
New games every week!
Site credits : If you can see it, Jayenkai did it.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Further Tweaks - AGameAWeek