ScratchData LogoScratchData
Back to TheLogFather's profile

SPD: reference variable vs custom block param

THTheLogFather•Created December 22, 2014
SPD: reference variable vs custom block param
68
35
1722 views
View on Scratch

Description

Speed test demo -see studio for more speed test demos: http://scratch.mit.edu/studios/795672/ ------- This one shows that referencing a variable takes slightly longer than referencing a custom block parameter. That means if you are going to reference the same variable (or several) lots of times, without it changing, it could be slightly quicker to actually send it into a custom block as a local parameter, and reference it in there like that. (But it does have to be a *lot* of times to make a significant difference – here it accesses them a million times, with ~0.1s difference.)

Project Details

Project ID40989674
CreatedDecember 22, 2014
Last ModifiedDecember 13, 2016
SharedDecember 26, 2014
Visibilityvisible
CommentsAllowed