RB clear winner in speed test

Chris Yavelow Chris at yav.com
Tue Apr 20 20:40:22 EDT 2004


Hi all,
Thanks for the help in working this out. The people from the 
Revolution list had gradually optimized the code for 3-word strings. 
I have generated new search data consisting of random lengths from 3 
to 7 words and the effect on the Revolution speed is staggering, 
while there is no effect on the RB speed.
The new search data list is here with the sample projects: 
http://www.yav.com/speed.html

Some things I discovered with this that are relevant here are:

1) Loading the file as a binary stream (suggested by Seth Willits and 
others) is blindingly faster than loading the data as a normal text 
file.
2) The following contstruction (using "join") is no slower than using 
a loop to construct the variable from the array
      matches=join(STarray,(chr(13)))
3) Bill Johnson's suggestion involving tracking the string length 
with ".LenB" then making a MemoryBlock and so forth, while being 
wicked cool, is not significantly faster than the simple one-line 
"instrb" approach used in the project (it's only about 1% faster)
4) Hiding the fields before filling them has the same dramatic impact 
on display speed as the following Charles Yeomans' suggestion, so I 
opted not to hide them:
      TargetText.SelectAll
      TargetText.Seltext =TT

The current scores (representing the total of the three stages: Load 
Data, Check Matches, Display All):
RealBasic = 75 ticks
Revolution = 583 ticks
SuperCard = 1464 ticks

Thanks again for all the input.
Chris Yavelow
http://www.ChrisYavelow.com



More information about the use-livecode mailing list