Spent most of yesterday flicking through bits of code, removing sections, tweaking bits, and generally making a few things that little bit faster.
-=-=-
Scrapping a ton of debug messages seemed to help quite a bit, and I also took some time to optimise a bunch of ifs into selects where appropriate.
The timeout event was tweaked a little bit so it checks less often. It's still often enough to do the job intended, but with a reduction in Mills() checks, it means it happens that little bit quicker.
After all was done, I'm seeing an approximate 30% speed increase.
The values in the code below went from averaging 130 mills to around 90 on my system, so that's a nice speed-up.
As always, be sure to let me know if I've broken anything along the way!
Today I need to fix up the export/import function. Somewhere along the line, that's gone a bit wonky, and I'm not really sure where or why that's happened.
Annoyingly, testing this functionality usually ends with the browser in question cluttering up with 100 or so duplicates of imported code.
It's a horribly messy job!!
But the task is to make it better, so that that doesn't happen.
Hmmm..
// Optimisationalism
// by Jayenkai
// Created 2021/7/2
Dim Array(2000)
Graphics 512,512,1
last=0
Repeat
CLS
lap=Mills()
scry=0
y=0
For m=0 to 2000
x=array(m)
y=(2000-(m*140))+scry
If y>0 then
Print last
Endif
Next
last=Mills()-lap
Flip
Forever