On Dec 8, 2006, at 10:00 AM, Jan Erik Moström wrote:
Imagine my surprise when it took RB a minute to do what perl did in
15 seconds. I'm not surprised that perl is faster, only HOW much
faster it is. My argument was going to be, "see, difference wasn't
that much, and RB is much easier to read," but these results make it
no contest.
So my question is: Why is RB so much slower? What is it doing that's
making the difference? And could I do something to close the gap?
I missed the original post so I don't know what the perl script
actually did but perl is very very good at string handling and
regular expressions. At some time I compared perl with other
languages that also used the same regular expression for processing
text files and the difference was *huge* ... in fact I'm surprised
that the difference isn't bigger (assuming we're talking string
processing and regular expressions).
And remember, you can call a perl script from within RB (see the
Shell class), but you can't call RB from perl :).
So, create the perl script the work on the text and then call this in
RB:
myShell.Mode = 2
myShell.Execute "perl-script.pl file-to-process.txt"
Do
app.DoEvents(10)
Loop Until Not myShell.IsRunning
// handle the myShell.Errorcode and myShell.Results here
Tim
--
Tim Jones
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>