New games every week!
A Day Off Blog
11th February 2024
Yesterday was pretty much a day off.
The sliffles and flu took hold, and I've had over 24 hours of sleep during the past two days.
Not much coding is getting done!


I did try at least something, yesterday. For-loops in JSE are incredibly slow, so I opened up the code and poked and prodded around a bit.
In order for a For-Loop to word, the parser changes it into a Repeat-Until clause, and adds a "vbl=vbl+step" line after the repeat.
This "works", but it also means the interpreter is hitting about 10 checks, where a For-Loop would be infinitely less.
I'm fairly sure this is why nested for-loops are causing immense slowdown.
There's also the oddity where a simple check is being counted as a "token", in the exact same way that "Draw the entire lighting buffer over the top of the screen using a blend mode" is also being counted as a single token.

If a for-loop causes about 125,000 tokens, the language will go "OK, give it a breather" before carrying on with the next bit. And all those breathers are adding up quicker than if the language was ACTUALLY doing something more difficult.

My head was going "'oh, yes, I could definitely optimise that.."
... And my flu was going "Weee, wobbly woo woo, yeaaay!!!"

Guess which one won the argument..

I might try to tackle that again, today, and see if I get any further with it.
The last Optimisationalism (4) gives me a ton of stats that I can hopefully use to tokenise the commands a little better. Make things a little more optimised and give the language a larger threshold when it comes to hitting the breather point.
Whether I can manage to get that to work, though, remains to be seen. We'll see, I suppose.

Oh yeah, and I should probably write a game, too.

"Cyborg @Derek, cybernetic implants, glowing, deadly, sci-fi, weapon, danger, neon" by
Views 16, Upvotes 1  
Daily Blog , Ill
New games every week!
Site credits : Jayenkai put all his heart and soul into everything you can see on this site.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - A Day Off - AGameAWeek