Surprise...

jbv jbv at souslelogo.com
Mon Aug 20 16:17:18 EDT 2018


I made a test with the same loops and the same data on LC 6.5.2
desktop Mac, and arrays run 20% faster than items...
On LC9 server I get opposite results : items are 2 times faster then arrays.

As said in my original post, AFAIR U have always used arrays instead
of items & lines because it has always been faster, even with
multidimensional
arrays...


On Mon, August 20, 2018 9:57 pm, Alex Tweedly via use-livecode wrote:
> Not really a huge surprise ... access to chunks such as 'item' and
> 'line' are (potentially) slow when you are searching relatively large
> strings. So the archetypal example
>
> repeat with i = 1 to N    get line i of tBigString
> end repeat
>
> can get slow if N is large, because of repeatedly scanning over large
> leading sub-strings to get to line 'i'.
>






More information about the use-livecode mailing list