I've worked in a company where we had to do time budgets for jobs. Our general rule of thumb was writing typical code, from scratch, in perl was about 2.5 times more efficient. That was normal code, and basic HTML fluff.

For every major API you have to interact with, CPAN vs Java stuff, add another factor of 2.

So for the typical example of working with 1. A database API, and 2. Filesystem search/modify/replace, you get 2.5 x 2 x 2 == about 10 times faster. A Java guru I work with agrees with these figures. I've written automation systems in about a month, and then waited 18 months for an ( admittedly better ) Java version to replace it.

With respect to CGI, remember the process creation/teardown is only relavent above about 1-2 hits per second per CPU. Below that rate, it hardly matters.

Also, CGI applications have zero resource usage when not in use. I'm not a Java person, but from memory most of the speed from Java comes from having a permanently running VM, kinda like mod_perl. I used to work for Cisco, and on their big main worldwide E10000 intranet, they had thousands of perl scripts. They could do this because each script wasn't using up permanent resources.

Cisco later switched to Java corporation wide, with "ALL NEW APPLICATIONS IN JAVA!". They filled up a dedicated E10000 in less than 2 months just from NEW apps, because they could no longer add all the VMs required by all these apps.

Hope some of this helps


In reply to Re: Perl vs Java in Heavyweight Filesystem Processing by adamk
in thread Perl vs Java in Heavyweight Filesystem Processing by higle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.