REV, RB, SC speed test, Latest results
Cubist at aol.com
Cubist at aol.com
Tue Apr 20 22:28:03 EDT 2004
sez Chris at yav.com:
>Now there has been considerable activity on the RB list, and the
>total speed is down to 77 ticks for RB, 70 for Revolution. But,
>looking at the Revolution code, I see that the hacks are optimized
>for 3-word searches, and that's not the intention. Also, RB counts
>all the duplicate matches (for a total of 248) while Rev doesn't
>count the dupes and comes to 192 matches.
It may be worth noting that this is the first time anyone said anything
about how many words are involved, or whether duplicates should be counted
separately. This just goes to show that when one is optimizing code, it helps to
have detailed knowledge of the purpose(s) that code is intended to serve.
So: Counting the duplicates matters, and working with an arbitrary number
of words matters. Anything else? F'rinstance, would it matter if the code
keeps track of which line-numbers the target phrases were found in -- "Phrase X
found 5 times, in lines 1, 2, 5, 67, 68", that sort of thing? Would it matter if
any of the lines you're searching includes more than one instance of a target
phrase?
More information about the use-livecode
mailing list