If you are interested in language benchmarks you might want to check out
the "Great Computer Language Shootout":

http://www.bagley.org/~doug/shootout/

It has some surprising results.

Enjoy,

On Fri, 2002-08-02 at 01:08, Paul Tremblay wrote:
> This question may be too vague for a good answer, but my curiosity makes
> me ask it anyway. I thought I read somewhere that perl is actually
> faster than C for certain tasks. The vagueness of the question probably
> lies in exactly what task, who writes the program, the size and type of
> data, and a dozen other factors.
> 
> Specifically, I am writing a perl script to convert RTF to XML. I
> downloaded a utility called unrtf, written in C, which converts RTF to
> HTML, a somewhat easier task. I got depressed when I ran unrtf on
> small files and saw that it didn't take *any* time. But when I ran it on
> a big file of 1.8 megabytes, it actually took 6 minutes and 30 seconds.
> My script only took a minute! (Hooray, after all this hard work, that's
> a little encouraging to see!)
> 
> When I ran the same file through a java utility called majix, it took
> over a minute. It is hard to say exactly, because majix supplies their
> own timer, and this timer only starts when java starts processing the
> documents, some 20 or 30 seconds after you launch it.
> 
> I had actually considered learning C++ to make my little script really
> fast so that people would consider using it. I really doubt I would have
> really gone through all that trouble, but now I am wondering if C++
> would have given that much of a time advantage--if any at all.
> 
> Certainly, a perl script would be easier to maintain and debug.
> 
> Thoughs on how C, java, and perl compare on speed? 
> 
> (I know I did a little test with sed, a python script, and a perl
> script, just changing the word "the" to "teh" in a huge file. Sed and
> python took about he same time, while perl was six times faster.)
> 
> Paul
> 
> 
> 
> -- 
> 
> ************************
> *Paul Tremblay         *
> *[EMAIL PROTECTED]*
> ************************
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
-- 
Bryan DeLuca
UNIX guy

Public key available at:  ftp://ftp.supakewl.com/pub/bryan_pub.key
This E-mail was scanned by Carnivore.  Get GNUpg http://www.gnupg.org


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

Reply via email to