Reversing a list

Sarah Reichelt sarah.reichelt at gmail.com
Fri Apr 4 07:52:52 EDT 2008


>  HOWEVER, what naive types like me would like to know
>  are:
>
>  1. How did you time these routines ?

I built a test list of 5000 lines, then stored the millisecs, ran the
reversing routine and checked the difference between the current
millisecs and the stored millisecs.

>
>  2. Although it is very clever (I, for one, had a bit
>  of fun having a try) to write a routine that reverses
>  a list a few demi-semi-gulps faster than another,
>  until we are all using super computers to find out the
>  question for 42 (pace Douglas Adams) I wonder why
>  those few micro-gulps really might matter ?

My original routine took almost 2 seconds to reverse a list of about
5000 lines on a fast computer. While not too critical, this was enough
to make the program feel unresponsive. Even if I had decided to accept
this, what if in the future, my list had grown to 20,000 lines. Then I
would be looking at a delay of 8 seconds after a click. While
computers keep getting faster, you have to allow for data getting
larger too.

Cheers,
Sarah



More information about the use-livecode mailing list