Timing (was wordOffset, repeat loop, speed?
Mark Brownell
gizmotron at earthlink.net
Mon Jan 6 14:50:01 EST 2003
I just did an exact duplicate test in Director using the textCruncher Xtra
where the same 400 kbyt text doc took 2 ticks to build my array. It also
handle any combination of characters as the text to find. I will look into
"offset()" to see if I can get both things working the way I want it. When I
did this in Realbasic I got almost the same results as textCruncher Xtra. I
believe that all it is is part of the string class in C++ being added as an
Xtra, in Director. I hope I can build this fast parsing system becuse I like
what I have seen so far in RR.
on 1/6/03 2:24 PM, Dar Scott at dsc at swcp.com wrote:
>
> On Monday, January 6, 2003, at 11:58 AM, Mark Brownell wrote:
>
>> 2.) I noticed that it won't work with multiple words or empty space
>> between
>> characters. I would like to work with the numericle offset of
>> characters and
>> place that info gathered into an array if possible.
>
> Would offset() do what you want?
> I would expect this to be faster, since going to the start position
> will have constant time.
>
> (Your method probably has mc^2 time, call it E ;-), where m is the
> number of words to find and c is the length of your string in
> characters. Using offset() should have mc time. Why squared? I'm
> just guessing, but I assume wordOffset() has to count up to the
> starting word each time.)
>
> Dar Scott
>
More information about the use-livecode
mailing list