------------------------------
Message: 7 Date: Mon, 12 Jul 2004 21:33:56 -0700 From: Richard Gaskin <[EMAIL PROTECTED]> Subject: Re: Arrays in Rev (long) To: How to use Revolution <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Richard Gaskin wrote:
But to compare apples to apples more closely, we might modify tests 1 and 2 to store values indexed by i:
on mouseUp put 10000 into N -- put the millisecs into s repeat with i = 1 to n set the uTest[i] of this stack to "hello world" get the uTest[i] of this stack end repeat put the millisecs - s into s1
-- put the millisecs into s repeat with i = 1 to n put "Hello World" into line i of tMyVar get line i of tMyVar end repeat put the millisecs - s into s2 -- put the milliSecs into s repeat with i = 1 to n put "Hello world" into tMyVar[i] get tMyVar[i] end repeat put the milliSecs - s into s3
put "Props: "&s1 &cr& "Vars: "& s2 &CR& "Array: " & s3 end mouseUp
And here we see that delimited vars don't scale well in indexed accesses:
Props: 165 ms Vars: 17155 ms Array: 110 ms
Richard,
Here is an interesting machine-dependant comparison. For your handler above I get, on my PowerBook G4 (866 MHz):
Props: 1270 ms Vars: 17285 ms Array: 684 ms
It is not surprising that the PowerBook should be slower (depressing how much slower) but that the result for the variable test is almost the same, while the other two test differ dramatically.
Jim _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
