Selecting a range within an array?
Glen Bojsza
gbojsza at mac.com
Wed Apr 7 19:59:54 EDT 2004
This doesn't seem efficient. If I already have a large array (in my
case 1000000 rows and only 1 column) then if I want [50000,1] to
[134000,1] into a new array looping seems like I'm not really taking
advantage of what already exists in memory (in my case).
Using a repeat loop with the array it takes 8 seconds.
While using a variable and
put (line 50 to 134000 of gte) into newgte
takes 1 second
I will need to do this a number of times( to 16 times ) based on the
user's selection. So the array can take 108 seconds verses 16 seconds
to get the requested update.
I am stuck with arrays but I really would like to have a faster
solution... unless there is something that I'm missing??
On Wednesday, April 7, 2004, at 04:36 PM, Dar Scott wrote:
>
> On Wednesday, April 7, 2004, at 03:18 PM, Glen Bojsza wrote:
>
>> I am trying to see how you can select a range from an array...
>
> Build a new array by looping over the subscripts. Skip empty values
> in building the new array. This is good for non-sparse or a little
> bit sparse as in your example.
>
> If the array can be extremely sparse, don't do that, but loop over the
> keys of the input array: 'repeat for each line in the keys of...'.
>
> Dar Scott
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list