But then again Perl is OO if you want it to be, Perl supports fork for
spawning processes (better support in Unix than in Windows though), and the
original poster was running mod_perl so subsequent hits to a script are run
from already compiled code cached in memory.

So I don't see that porting to Java gives much (if any) benefit.

In my opinion your time would be better spent optimizing the Perl code
instead of porting it to another language.

Rob

-----Original Message-----
From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 1:44 PM
To: 'Brett W. McCoy'; Agustin Rivera
Cc: [EMAIL PROTECTED]
Subject: RE: C vs. Perl


how about all of the issues involved with spawning off processes ... 

in java servlets I know this is handled because the servlet is always
running ... 

you may end up with a more efficient system and easier to debug code and all
of the other benifits from OO ... pretty much all around better by
re-writing in java ... rather than c



-----Original Message-----
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 1:21 PM
To: Agustin Rivera
Cc: [EMAIL PROTECTED]
Subject: Re: C vs. Perl


On Wed, 2 Jan 2002, Agustin Rivera wrote:

> Ok, the local Linux guru has proclaimed that C would be faster than Perl.
I
> know C is very effecient so I don't really doubt him, but my question
is....
> would it make that much of a difference?  I certainly wouldn't mind
learning
> C, the only question is would be worth the time to port our Perl scripts
> over to it?  Right now our setup is Apache w/modperl, and I'm getting
quite
> good at taking advantage of modperl's benefits.

The problem with C is that, while it is very fast, faster than Perl, your
development time is going to increase as well -- C is very lousy as native
string handling, and if you want to write CGI in C, you are going to have
to either find a compiled library that already has all the work done for
you, or struggle with your own CGI processing (both in handling CGI
parameters and in printing out HTML).

Kernighan & Pike, in their _Programming Paradigm_ book, go through an
example of building a piece of software comparing C, Java, Perl and Tcl.
C was by far the fastest, but also had the most lines.  Perl was the
second fastest, head and shoulders over Java, and also had the *least*
amount of code.  The program did some text processing, so it was obvious
that this is where Perl shines.

I don't think C is really going to gain you that much in CGI -- unless you
are hooking into, say, an application server or some kind of realtime
backend process, but then again, you can still write the CGI portion in
Perl and use Inline::C or some of the other facilities Perl has for
calling C code directly.

C is definitely want you want to use if you are, say, writing kernel
modules or intensely graphical games or anything that requires going down
to the bare metal (like writing a device driver).  But for web stuff, it
seems more trouble than it is worth.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
I am not afraid of tomorrow, for I have seen yesterday and I love today.
                -- William Allen White


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



----------------------------------------------------------------------------
--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to