New games every week!
JSE - Not a Lot...
Blog
19th October 2021
Spent hours, yesterday, trying to squeeze every little bit out of the engine that I could.
-=-=- Some folk will tell you that oldskool ifs "if (xx) {do this;} else {do that;}" are slower than the modern style of "xx : do this : do that;" This doesn't appear to be the case, and all the time and effort I spent converting everything yesterday, has resulting in things running SLOWER on some browsers. Big fat waste of time. Ctrl+Z FTW. Modern Javascript's optimisers are doing a great job, and in most cases, readability wins out, so stick with what you can understand, and let the browser do its own thing. A few rejigs of the placement of numbers, and the removal of temporary variables seem to have helped a lot more. I'm still having the biggest amount of slowdown when doing arrays. I though I'd found a nice method of speeding them up, yesterday, but in actual fact I'd simply broken the multi-dim functionality! Oops!! More Ctrl+Z, there. I'll probably give that another go, today, with multi-dim's in mind. Hopefully it works out a little better. Views 99, Upvotes 17
Daily Blog
,
Jse
,
Optimising
New games every week!
|