It'll be hard to give specific guidance without seeing your current code you tested with, and a representative data sample.

There are many ways to parse text in LC, and some are better with certain types of data than others. Total line length, number of items in each line, average length of each item, etc. can each effect outcomes somewhat differently using different methods.

If you have an opportunity to bundle up some data and a sample stack with your test code, I'm sure at least a couple of us may find time to see what can be suggested for it.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com


Beat Cornaz wrote:

> A while ago I did a test for speed with 'repeat for'. It turned out
> that with items it worked the fasted. Chars were slower and words
> even more so.
>
> Now I redid the test with 'LineOffset'. To my surprise: with chars
> was considerably faster.
>
> A long list with lines like 'aabcbcax' (chars) OR "a,a,b,c,b,ca,x,"
> (items)  and finding a specific line gave the following time results
> in ticks (depending on how deep down the wanted line was in the list
> ) :
>
> items              chars
> 57                 42              
> 4530                       2871
> 2908                       2087
> 24                 15
>
> I did the lineOffset for 1 specific string and repeated the
> lineOffset  100000 times. The variation with the chars was about 1.35
> to 1.6 times as fast as the variation with items.
> Can anybody confirm this from experience and maybe explain why the
> LineOffset works faster with strings of chars, while the repeat for
> works faster with items?
>
> I would also appreciate any other insights in how to speed up
> routines, as I am working a a program with Evolutionary Algorithms
> and I need to do hundred of thousands of calculations in each run,
> so speed is quite important.



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to