Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Perl slower than java

by Christian888 (Acolyte)
on Dec 08, 2010 at 22:58 UTC ( [id://876135]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl slower than java
in thread Perl slower than java

Processing-wise, my java equivalent is at least as inefficient as the perl code. I wonder if there is anything in the setting of the interpreter that may be slowing down the execution?

Replies are listed 'Best First'.
Re^3: Perl slower than java
by trwww (Priest) on Dec 09, 2010 at 04:51 UTC

    perl >= 5.10 has gotten pretty bulky compared to older versions.

    I'm a bit curious as to how fast the newest ruby and python run the same algorithms.

    I bet if you would run the same code under perl 5.6 it would run a lot faster (the C data structures behind perl 5.6's variables are a lot more light weight). At least based on a very informal test we did here: Re^3: Why is this code so much slower than the same algorithm in C?.

      You have it backwards. The C data structures in 5.10 and greater are more light weight. Look elsewhere for the speed differences you have seen.
      --
      A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
      Online Fortune Cookie Search
      Office Space merchandise

        Yeah shouldn't have pointed out data structures being the cause when really I have no clue. I'm not really interested in digging up why one is faster than the other.

        I am interested in any educated guesses or ideas others may have. Any opinion/evidence on why 5.6 was so much faster in that example?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-18 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found