Re: Perl vs Java for specific task

nobull_at_mail.com
Date: 08/31/04


Date: 31 Aug 2004 01:40:14 -0700

linux_email2000@yahoo.com (John Smith) wrote in message news:<248a20a2.0408301038.4de5ee36@posting.google.com>...

> I have a rather odd question. My company is an all java/oracle shop.
> We do everything is Java... no matter what it is... parsing of text
> files, messaging, gui you name it. My question is this... is Perl so
> much better at parsing text files and outputing that we would see a
> substantial speed increase? We process about 10 million records in
> flat files a day for reformatting before putting them in a DB.
>
> Also, when it comes to Unix threading... which one would be better off
> Java or perl?

AFIAK most Java implementations have a much better threading
implementation than is found in Perl5. This is becase Java was
designed to be threaded from day-0. In Perl threading is very much an
afterthought.

Up until Perl5.8 Perl's threading was essentially useless and even now
you are usually better using forks than threads on Perl.

> Essentially, we would break the 10 million down into 10
> files... each file is done in a seperate thread... The program also
> has to keep a hashmap of keys to make sure we don;t include duplicate
> records and it must connect to oracle every once in a while... is
> switching to perl worth it considering the investment and know how we
> have in java? This is the only portion of the code we would consider
> switching to perl...

A Perl programmer could possibly write a solution using 10 separate
processes that would outperform a Java solution. But no even as a fan
of Perl I wouldn't say this alone was sufficient justification to
learn Perl.

This newsgroup does not exist (see FAQ). Please do not start threads
here.



Relevant Pages

  • Re: Threading enabled performance impact
    ... >> I know that using a perl configured/compiled with threading enabled can ... >> recompile without thread support, which we aint using, in order to ... > The advice others are giving you to "Go try it and see" is sound advice, ...
    (comp.lang.perl.misc)
  • Re: Threading enabled performance impact
    ... >> I know that using a perl configured/compiled with threading enabled ... whatever performance difference might exist between the two versions is ... The data and metrics depend on the OP's environment, ...
    (comp.lang.perl.misc)
  • Re: Multithreaded and/or nonblocking server?
    ... Net::Daemon does have a perl-win32 port. ... My sense is that this is a threading issue or an event issue. ... written by a coworker worked well), but tragically, I only speak Perl ... foreach { ...
    (comp.lang.perl.misc)
  • Re: Perl reliability?
    ... one log file, and sometimes it won't. ... Is Perl more stable on other platforms? ... If you could try it some how w/out threading, ... possibly not thread safe, possibly thread ...
    (comp.lang.perl.misc)
  • Re: Threaded Perl
    ... > Interchange requires that threading be dissabled in order to run. ... > I've grabbed the source and rebuilt perl and things are basically ... perl interpreter with thread-support compiled in, ...
    (Fedora)