ScratchData LogoScratchData
Back to TheLogFather's profile

SPD: list lookup vs calculation

THTheLogFather•Created May 11, 2015
SPD: list lookup vs calculation
27
19
1030 views
View on Scratch

Description

MORE SPEEDTESTS: http://scratch.mit.edu/studios/795672/ ------- This is something I should've tested a very long time ago... THE QUESTION: If you have a discrete set of input values to a fairly complicated expression (say, involving something like e^, ln, sin, cos, etc., or quite a few mults/divs/adds/subs), then is it quicker to recalculate this expression each time you want the answer, or to pre-calculate all possible results into a look-up table (i.e. list)? THE ANSWER: doesn't take that much for lookup to win!

Project Details

Project ID61496930
CreatedMay 11, 2015
Last ModifiedAugust 13, 2015
SharedMay 11, 2015
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root