Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Why is this code so much slower than the same algorithm in C?

by wanna_code_perl (Friar)
on Dec 09, 2008 at 05:02 UTC ( [id://729086]=note: print w/replies, xml ) Need Help??


in reply to Re: Why is this code so much slower than the same algorithm in C?
in thread Why is this code so much slower than the same algorithm in C?

Apples to oranges, but ActiveState 5.8.8 (Windows) on a significantly faster dual-core machine: 28 seconds.

Unfortunately, I no longer have any good way to run 5.6.

  • Comment on Re^2: Why is this code so much slower than the same algorithm in C?

Replies are listed 'Best First'.
Re^3: Why is this code so much slower than the same algorithm in C?
by trwww (Priest) on Dec 09, 2008 at 05:20 UTC

    Apples to oranges...

    Well the script is a constant because all three perl binaries can run it unmodified. Actually, I found 5.6 runs much faster (not surprising, it is a much slimmer app). The top run is using a system provided 5.8, and the second run is a 5.6 install I have for an app I maintain:

    $ time /usr/bin/perl test.pl Number: 232792560 real 0m29.042s user 0m29.039s sys 0m0.004s $ time usr/bin/perl test.pl Number: 232792560 real 0m20.968s user 0m20.961s sys 0m0.006s

    I ran it a few times and the figures were about the same. But I agree, not really useful. It is a bit interesting though.

    Regards,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://729086]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found