On my system, the perl takes 2.24 second and the python takes 3.76 seconds.
You are correct that the 2 versions I send out earlier are *very* different. I started from two places, the primes.pasm which I converted to C and perl versions and a pre-existing primes.py and primes.c that I converted to primes.pasm. My interest was in comparing parrot to other things, so I didn't pay any attention in trying to get comparable perl and parrot ones. Thanks for taking an interest.

-Tupshin

Jim Meyer wrote:

Hello!

Benchmarks are idiosyncratic and devious and I thank you for starting a
comparison whose results interest me greatly. =]

On Tue, 2003-02-18 at 10:03, Tupshin Harper wrote:

[...]and some are in languages I am less then fluent in (last touched any flavor of assembly in 1985, and barely touched it then), so be kind. I don't believe I'm being too unfair to any of the languages, though feel free to tell me otherwise.

I looked at the .pl and .py versions and was struck by the very
dissimilar approaches taken in the two. I translated the GOTO-style
primes.pl to a loop syntax in both Perl and Python which I believe
accurately represents the logic of primes.pasm without resorting to
actual GOTO statements[1].

I'd be very curious as to the runtime of these on the system you used
for the earlier benchmarks. On my box, the retooled Python script takes
only approximately 50% of the time used by the earlier Perl version; the
retooled Perl version runs in roughly 30% the time of its Perl
predecessor.

Thanks again for taking this initiative!

--j

[1] "Go To Statement Considered Harmful", Edsger W. Dijkstra, Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148; see
http://www.acm.org/classics/oct95/




Reply via email to