Reverse a list

Mike Kerner MikeKerner at roadrunner.com
Tue Feb 17 22:05:23 CET 2015


It just seems odd to me that the chunking is so slow when done the second
way.  Just for the heck of it, I did a SPLIT so as to work on an array, and
sure enough, it is just a little slower than the first technique (even
though there is the overhead involved with splitting the container into an
array before working on it).  I wonder if I can create an index of
positions in a container for the start of each line/whatever and speed it
up, because if so, then perhaps a new datatype is in order.

On Tue, Feb 17, 2015 at 3:59 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> On 2/17/2015 2:11 PM, Mike Kerner wrote:
>
>> Help me with the chunking piece, then.
>>
>
> Put 100 apples in a box.
>
> repeat with x = 1 to 100:
>   pick up one apple
>   drop it back in the box
>   pick up one apple
>   pick up a second apple
>   drop them both back into the box
>   pick up one apple
>   pick up a second apple
>   pick up a third apple
>   drop them all back into the box
>   ... continue counting out apples, starting at the beginning each time,
> until you've counted up to 100
>
> repeat for each:
>   pick up one apple
>   pick up a second apple
>   pick up a third apple
>   pick up a fourth apple
>   ... up to 100
>
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list