May have unearthed a reason for Javascript being so fast. If I run the same 
routine as ActionScript (the syntax is identical to Javascript for this 
example), the routine takes around 380 milliseconds. Still doing a good as 
LiveCode. But, if I change the list of numbers to be a Vector instead of an 
Array (a Vector is a typed array), the time comes down to 10 milliseconds.

This suggests that Javascript is assuming that the entries in the array are 
integers, whereas LiveCode and ActionScript are having to work out that the 
entries are numbers. Between treating the array as a set of integers, and 
Safari perhaps running Javascript faster than Flash Player runs ActionScript, 
that could account for the speed difference.

There’s some relevance to LiveCode too, in that with the new code in LiveCode 
8, variables will need to be typed, and that could lead to a speed up for these 
kinds of tasks.
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to