How long, in real time, does the average ZASM command take to execute?
Quick Question
Depends on the command, and the speed of you computer.
You can do your own benchmarking by creating a FFC with a sufficiently large for loop.
They usually take exactly 1/60th of a second, assuming you have cap fps turned on.
thebetter1 wrote:They usually take exactly 1/60th of a second, assuming you have cap fps turned on.
What?!
Actually I did run a few tests on this last week. ^_^
First two numbers, ratio of commands(in thousandths) to processor speed(in Ghz). Next number, percentage of frame rate drop.
Drawtile: 1 to 2.7; 75% loss.
PutPixel: 2.5 to 1; 11% loss.
Moving Link X,Y: 2.6 to 1; 9% loss.
FFC X,Y; same as above.
...Forgot to do enemies though.
Wait, that means 1000 simultaneous Drawtile commands causes a 75% loss?
Mathematically, yes, on a 2.7 Ghz processor, with no other scripts or game engine screen enemies.. etc, taken into consideration.
What that would do to slower computers would be unbearable however.
bigjoe wrote:Wait, that means 1000 simultaneous Drawtile commands causes a 75% loss?
why on god's green earth would someone need to do 1000 simulaneous drawtiles at once?!? 😮dd:
Well for optimization. It's clear that drawtiles are about the slowest thing you can do. So if you had a screen with lots of scripts running and were getting a lot of lag, you might want to consider not using those 20+ drawtiles just for some kind of transparent effect..or whatever.
Also I made a slight typo, it's in thousands not thousandths.