>I don't understand... why does Holgate's code take 20 times longer 
>than Brigaut's code on my machine, but not on Brigaut's machine? I'm 
>on a Mac.
>
>----
>
>on mouseDown me
>
>   srcList = []
>   srcList[10000] = "smurf"
>
>   oldMs = the milliseconds
>
>   revList =[]
>   repeat with thisEntry in srcList
>     addAt(revList, 1, thisEntry)
>     --revList.addAt(1, thisEntry)
>   end repeat
>
>   put "Holgate: " & the milliseconds - oldMs
>end


Well, amongst other things you have come up with your own method. The 
above routine is not what I wrote, I used append and not addAt, and I 
used repeat with x down to y, not repeat with x in y. If you time 
this:

on mouseDown me
   srcList = []
   srcList[10000] = "smurf"

   oldMs = the milliseconds

   revList =[]
   repeat with a = 10000 down to 1
     append revList,srcList[a]
   end repeat

   put "Colin: " & the milliseconds - oldMs
end

you'll see that it's more than 20 times faster than what you claimed 
that I wrote.




-- 
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to