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

Re^3: Subroutine overhead in Perl

by traveler (Parson)
on Nov 07, 2007 at 00:03 UTC ( #649369=note: print w/replies, xml ) Need Help??

in reply to Re^2: Subroutine overhead in Perl
in thread Subroutine overhead in Perl

It has been a while since I have developed java code, but I think this means the java was already compiled, while the compile time was included in the perl.

Replies are listed 'Best First'.
Re^4: Subroutine overhead in Perl
by ikegami (Pope) on Nov 08, 2007 at 07:27 UTC

    So? Aside that it's not entirely true — Java run-time engines typically compile Java bytecode into native code at run-time — it is not standard behaviour to run Java programs from their sources. Perl's developers made a choice to parse the source every time, and Java should not be penalized for it.

      I'm sorry: I was probably not clear. The timing for 'java' does not include the 'javac' step, but the perl timing includes the conversion of source to code for the interpreter. I was just suggesting that the 'time' commands were not timing the same things.

        That is what I understood, so I guess I was the one who wasn't clear. I'm saying he *is* timing the same thing: The time it takes to run the program. Using javac is not part of running a Java program whereas parsing the Perl sources is part of running a Perl program. Perl and Java do things differently, but that doesn't mean he's not timing the same thing. (If they did things the same way, what would be the point of timing them?)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://649369]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-04-25 11:49 GMT
Find Nodes?
    Voting Booth?