Article View: comp.lang.misc
Article #4299Re: Relative Speed of Perl vs. Tcl vs. C
From: Fergus Henderson
Date: Sun, 21 Jan 1996 11:16
Date: Sun, 21 Jan 1996 11:16
46 lines
2220 bytes
2220 bytes
yogi@shellx.best.com (Yogi) writes: >Can't seem to find any info on statements I have read that seem to conflict: Have you ever heard the phrase "Lies, damned lies, and benchmarks"? >Somewhere I have read that Perl coded grep runs as fast or faster than C >coded grep in Unix. (Larry Wall wrote this, correct me if I'm wrong.) Sounds quite likely to be true. For this specific task, Perl could easily be as fast as C. >And in a CGI-web book I read that Perl is an interpreted language that runs >10 times slower than C. For most programs, that is probably true. >But Perl is compiled, right? Sort of. Perl code gets compiled to a bytecode which is then interpreted. >So how is that different >than say, the Tcl interpreter? It's much more efficient. >So what's the real answer, or are both statements true somehow? I know that >Perl can run faster or slower depending on how you code it, (C too) and >so I guess you would have to find the fastest C code for a particular function >and similar fastest Perl code (or Tcl) and compare THOSE programs to get >a definative answer. That's right, although even then the answers will no doubt be subject to much debate. I'm afraid that obtaining a genuinely definitive answer on questions like this is prohibitively expensive. >And then, what about the speed of Java in comparison to the other 3? The currently available implementation of Java uses the same basic technology (compiling to bytecodes) as Perl, so performance is likely to be pretty similar. But Java is probably much easier to write an efficient native-code compiler for. -- Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
Technical Details
Message-ID:
<9602122.8425@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!munta.cs.mu.OZ.AU!fjhReferences:
<4dhuoj$cbe@shellx.best.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc,comp.lang.perl.misc,comp.lang.tcl,comp.lang.c,comp.lang.java Path: arc1-ca.pugleaf.net!munta.cs.mu.OZ.AU!fjh From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Relative Speed of Perl vs. Tcl vs. C Message-ID: <9602122.8425@mulga.cs.mu.OZ.AU> Sender: news@cs.mu.OZ.AU (CS-Usenet) Organization: Computer Science, University of Melbourne, Australia References: <4dhuoj$cbe@shellx.best.com> Date: Sun, 21 Jan 1996 11:16:56 GMT