Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Company considers recoding Java app in Perl

by Tanktalus (Canon)
on Aug 12, 2005 at 20:37 UTC ( #483399=note: print w/replies, xml ) Need Help??


in reply to Re: Company considers recoding Java app in Perl
in thread Company considers recoding Java app in Perl

I'm not sure I agree. Actually, I'm pretty sure I don't.

Modern JVMs are faster than the 1.1 or 1.2 JVMs, yes. But CPU speed has also more than doubled since then. More like 5 or 6 times speed boost. And memory is dirt cheap - I started with Java 1.1 on 168MB RAM. I'm now running perl on a machine with 4GB RAM. I'd wager that Moore's law has taken care of more of Java's speed problems than Java has.

Java still has a significant object overhead, even compared to perl's far-from-zero overhead. This puts an upper barrier on how fast the JVM can go. And you just can't do that much interesting in Java without objects.

What really gets me is the Java startup cost. Perl can compile, optimise, and execute some activities faster than Java can load, initialise itself, and execute a pre-compiled .class file. And then Perl has mod_perl to take care of that problem. Oh, no, sorry - that eliminates what little startup cost there is for perl, at least for a subset of the problem. Yes, you can do the same for Java. Memory usage shoots right up, though...

My last point is that the amount of abstraction you need to get a job done in perl is quite different from Java. Yes, in perl, you can go whole hog. In Java, you often don't have a choice but to go all the way.

I'm still way more productive in perl than my Java-writing peer. And he knows it. In the end, it doesn't matter to him because he still is getting paid, which is really the bottom line to him.

  • Comment on Re^2: Company considers recoding Java app in Perl

Replies are listed 'Best First'.
Re^3: Company considers recoding Java app in Perl
by Ovid (Cardinal) on Aug 12, 2005 at 21:06 UTC

    Perl's development speed is faster, but from what I've seen of Java, trying to code 00 Perl in the style most Perl programmers use seems to be quite a bit slower. Compare the speed of Lucene versus Plucene or XProlog versus AI::Prolog. Perl loses hands down. These started as straightforward ports which is part of the problem, but their coding styles don't seem significantly different from what I see many Perl programmers use.

    On the other hand, I hear people claim that when Perl is coded in a more idiomatic style, it competes quite handily, but I'd like to see benchmarks against real-world applications rather than samples.

    Cheers,
    Ovid

    New address of my CGI Course.

      FWIW, you could always try the shootout.
      Yes, Plucene may be much slower than Lucene. But that's because the concept was IIRC taken one-to-one. Java has it's language pro's and Perl has it's language pro's. But they're not the same.

      Ordinary morality is for ordinary people. -- Aleister Crowley
Re^3: Company considers recoding Java app in Perl
by perrin (Chancellor) on Aug 12, 2005 at 22:29 UTC
    Comparing Java servlets with mod_perl handlers gives very close results. I don't think the slowness people often experience on Java sites has to do with the actual language as much as the choices made when developing in it.
      Comparing Java servlets with mod_perl handlers gives very close results. I don't think the slowness people often experience on Java sites has to do with the actual language as much as the choices made when developing in it.

      That's been my experience. It's not Java per se that causes slow down and bloat, but the huge frameworks that are brought in for the simplest task.

        Considering that java is one of languagues that are one with their frameworks (.Net, J2EE), what you're saying is... ee, what... jvms are fast, java programs are slow?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-07-20 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (424 votes). Check out past polls.

    Notices?