Arrays in Rev (long)
Troy Rollins
troy at rpsystems.net
Tue Jul 13 00:48:17 EDT 2004
On Jul 13, 2004, at 12:33 AM, Richard Gaskin wrote:
> Does 0.124ms per access have you tapping your foot with impatience? ;)
Generally, no. Obviously not. As you say, speed is relative, and Rev is
undeniably fast.
>
> I wonder what accounts for the difference. My PB has an L3 cache,
> 768MB RAM, OS X 10.3.4. Any other differences we might look at?
PB 17", 1GB RAM OSX 10.3.4 (Fairly busy machine right now. Probably a
dozen+ apps running, a bunch o'stacks open in Rev.)
> It's interesting to see how close the times are for the object-based
> properties and the variable-based arrays. This would be jaw-dropping
> in any other xTalk, as most others page objects from disk and you know
> what that does to performance, but just another benefit of the
> always-in-RAM way that Rev deals with stack files.
>
> And all the while, just one line away from being saved to disk if
> needed.
>
> If the ~40% difference in execution speed is critical (here that
> amounts to 0.0055ms per access), remember you can always store an
> array into an object's custom props if needed:
>
> put the customProperties of stack tMyStack into tMyArray
> set the customProperties of stack tMyStack to tMyArray
Given that all the choices have some compromise, I still favor this one
I think (stacks, and stack properties moved to vars when speed really
matters). Mostly due to the improved versatility.
I do like the one line to save bit, as well.
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
More information about the use-livecode
mailing list