Revolution speed sucks?

Brian Yennie briany at qldlearning.com
Tue Aug 12 16:45:00 EDT 2003


> Did your revolution script read in and write out to text files as the
> PERLotto script does?

Yes. It uses your config file and writes out to "results.txt".


> If so that may explain the 10% Perl speed advantage. Did you read in 
> and
> write out to a field? Did you read the field into a variable and then 
> write
> the results back to the field? Did you leave out the textcolor 
> commands out,
> etc.?

I ran the script from the command line. You may not be aware of this 
(and many aren't), but Rev also has command-line engines (i.e. no GUI, 
just runs a script like Perl). I ran with the Mac 'Darwin' version: 
there is also a windows console engine available.

The behavior is as close as possible to the Perl script, since I wanted 
a fair comparison of the engine alone: it reads from a file and writes 
to one in the same manner as the Perl script. It could be sped up by 
using variables and writing the file once, but then it wouldn't be a 
1-to-1 comparison anymore.


> I modified OmniLotto to read the field into a variable "games" and did 
> all
> the calculations there and then spit the variable games into the field
> "gamelist" on a line by line basis (with lock screen until done).
>
> To process 100,000 games in Perl took 14 seconds while Revolution took
> over10 minutes to process only 10,000 lines.
>
> The more lines in the field, no matter whether the data is manipulated 
> in
> the field directly or in an array increases the time to process by some
> order of magnitude. At least that's my perception, in this type of data
> manipulation. Perl does not.
>
> Would you care to share (and I'm humbled that you took the time to 
> translate
> my perl code in the first place) your .rev script with me for 
> inspection? I
> would be most curious and "sharing the magic" is never a bad thing, 
> right?
> ;-)

I'll send you a copy off-list. You're welcome to use it for anything 
you like, share it, modify it, etc.

I think this has been a good exercise for all of us!



-------------------------------------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
(904)-997-0212
briany at qldlearning.com
--------------------------------------




More information about the use-livecode mailing list