How is this counter-intuitive? An un-wrapped repeat loop is just a long series of if statements that compares some integers. Integer comparisons are fast.
So the repeat loop is trivial. The real issue is between Lists as they are stored & as we see them displayed. Wwhen we see a list, we seeing the text display of a list, not the wonderful underlying indexed structure of pointers. This TOC of pointers is why lists can to do their work so quickly. Text is basically a structureless long stream of bytes. Chunks don't really exist - they get derived by parsing these byte streams. That's why .ref on Text members is so cool. It creates a pointer into the stream. Text conversion is a sequential transformation (a big repeat loop, if you will) When a list is converted into text, each item of the list must get converted (in the appropriate order), + all the syntax conventions used by the 'display of a list' must be fabricated and merged into place also. All of these characters really aren't part of the actual data. ( [],.:" ) btw: going the other way (Text -> List) is also slow. But at least you'll end up with something that can be manipulated fast, because it's pre-indexed. hth -Buzz At 12:17 PM -0500 4/12/02, you wrote: >At 09:59 -0700 04/12/2002, Buzz Kettles wrote: > >>Text conversions of lists are notoriously slow! > >Huh. > >>Your text conversion approach is about 2 orders of magnitude slower ... > >>sorry dude. > >Why? This is interesting! It seems *so* counterintuitive to me that >a repeat could be *faster* than simply slamming values around. > >-- > > Warren Ockrassa | http://www.nightwares.com/ > Director help | Free files | Sample chapters | Freelance | Consulting > Author | Director 8.5 Shockwave Studio: A Beginner's Guide > Published by Osborne/McGraw-Hill > http://www.osborne.com/indexes/beginners_guides.shtml >[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!] [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!]
