mabye ud like to include a button that maks another broadcast that runs a long, pointless script. this could show hoe the speed is affected while under more presure!
I created this alternative version of Jens' race ((link to project) Mostly this is to address AdvancedScratcher's comment that the first script is being unfairly penalized. The first script should now clearly update its 'var1' twice within each outer loop... so it appears "more fair". But it actually makes the first script even slower: only one loop iteration is executed in any display cycle, so now it is running at 1/3 the rest.
wat do u do in this it sucks cause u dont do anything
Download this project!
Download the 5 scripts of "race2a" and open it in Scratch
Project Notes
This is a slightly modified version of Jens' project. The first script (controlling 'var1') now updates 'var1' twice within the outer loop by using a repeat. So it looks like a fairer comparison. But by using an inner repeat loop, it runs slower than it did originally.
-------------------------------
This project benchmarks three different scripts, each doing seemingly the exact same thing: Forever incrementing a variable by one. It's interesting how the speeds differ because of parallelism and of how Scratch handles display updates within loops. You can get some hints out of this how to boost up your scripts... Credit goes to johnm for pointing this out to me, when we discussed performance issues relating my lists implementation.
Comments
You need to be logged in to post comments
Add a Comment
mabye ud like to include a button that maks another broadcast that runs a long, pointless script. this could show hoe the speed is affected while under more presure!
Very interesting! Thanks for pointing this out to me.
I created this alternative version of Jens' race ((link to project) Mostly this is to address AdvancedScratcher's comment that the first script is being unfairly penalized. The first script should now clearly update its 'var1' twice within each outer loop... so it appears "more fair". But it actually makes the first script even slower: only one loop iteration is executed in any display cycle, so now it is running at 1/3 the rest.
wat do u do in this it sucks cause u dont do anything