It is possible, and indeed likely. When working with large text strings, every 
access to the string gets evaluated from the beginning to the end. You can see 
how this would be extremely time consuming. Arrays however are accessed using a 
kind of index so when you refer to an element such as myArray[1273] LC knows 
exactly where that is in memory without having to scan through the data to find 
it. A string would have to be scanned for a number of carriage returns, line 
feeds, or both depending on the platform and the format of the string until it 
arrived at line 1273 and the farther it had to go, the longer it would take. A 
larger array would not take any longer to find a single element than a very 
small one. 

Bob


On Oct 6, 2011, at 2:50 PM, Matthias Rebbe wrote:

> Is it really possible, that there is such a performance improvement?
> Maybe this is a cache thing?


_______________________________________________
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