Selecting a range within an array?

Glen Bojsza gbojsza at mac.com
Wed Apr 7 20:23:34 EDT 2004


The arrays I am using are not complex in the sense of the size or being 
sparse (they are actually always completely filled). I am using the 
arrays in an application that requires a lot of simple 
manipulation...in this case I have an array that has a million rows 
that represent data points to be plotted for an entire time range.

As a user wants to narrow down the time range that they have interest 
in I want to take the existing data points that are already in an array 
and grab the range the user is interested in and then do a re-plot. The 
idea is show the big picture and then you can "zoom in" to what 
interests you in the graph.

Speed is important because the application is to be as "real time" as 
possible since the data has already been parsed and put in memory the 
user experience in moving from graph view to graph view needs to be 
smooth. (I'm competing against an existing java application).



On Wednesday, April 7, 2004, at 07:04 PM, Brian Yennie wrote:

>> 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).
>>
>> ...
>> I am stuck with arrays but I really would like to have a faster 
>> solution... unless there is something that I'm missing??
>
> What exactly are you trying to do with a million rows in an array? It 
> may be that this is a weakness of Rev's array being associative: they 
> are not stored in numeric order under the hood, so it's not trivial to 
> pull out a range...
>
> - Brian
>
> _______________________________________________
> 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