[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Frontier / AppleScript / Perl comparison chart



At 19.48 -0400 1998.06.24, dj_feldmeyer@jft.com wrote:
>More to the point for me than capability or features is speed. I started
>learning perl because I have a database crunching task which takes more than
>100
>hours in AppleScript. (I killed it before it finished; I have other work
>to do,
>after all.) It takes overnight in Frontier, a language with which I feel
>comfortable enough to imagine I'm writing reasonably efficient code.
>
>After spending a week learning the language in snatches of an hour here, a
>half
>hour there, the same task takes five minutes in perl. I expect to improve on
>that when I have some more time to devote to it (not merely for the sake of
>speed improvements but to enhance the functionality).

Good point ... does anyone have any speed tests?

I wrote these three scripts.

Frontier:
n = 0;
loop {
    n = n + 1;
    x = 1;
    if n > 100000 {
        return
    }
}

AppleScript:
repeat 100000 times
    set x to 1
end repeat

MacPerl:
for($n=0; $n > 100000; ++$n) {$x = 1}


Frontier took about 14 seconds.  AppleScript about 7.  MacPerl was about 1
second.

Any thoughts, ideas, of ways to quantify speed differences?

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch