🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4309

Re: Relative Speed of Perl vs. Tcl vs. C

#4309
From: xian the desk lisard
Date: Thu, 25 Jan 1996 12:47
31 lines
2203 bytes
On 22 Jan 1996, Randal L. Schwartz wrote:

> Tim> An important point, though, is that all 'reasonably' written C programs
> Tim> will run within a factor of 2 or so of 'about as fast as you can get,
> Tim> while for some problems, Perl won't be able to break through about a
> Tim> factor of 7 or so, even if you are a Perl expert.
> 
> I just want to point out to everyone that you are simply making that
> figure up based on what you think Perl is doing internally.
> 
> Tom Christiansen has had a long-standing bet that someone can't give
> him a program in C that he can't make run no more than "e" times
> slower (about 2.8 for you non-math-geeks) in Perl.  So far, no one's
> done it.

hang on.  i think you missed what he's saying.  he said, effectively,
no that perl runs no less than 7 times slower than c, but that it runs
about 3.5 times slower.  ok, it's still about 26% up on e, but it
isn't quite as far from reality.

obviously, though, something that perl is very efficient at will go
like anything, because that's what the bytecode was designed for.
(similar results can be seen when rewriting a forth word in assembler,
for example.)  but for "generic" applications, of course c will
outpace perl, simply because a bytecode interpreter adds a 1-200%
overhead to _any_ program.

xian the desk lisard -- cdahello@comp.brad.ac.uk
    time's taught the killing game herself
  NO        i taught the killing game
                                              first
Technical Details
Message-ID: <Pine.SOL.3.91.960125124302.354D-100000@dcws100.comp.brad.ac.uk>
Path: arc1-ca.pugleaf.net!dcws100.comp.brad.ac.uk!cdahello
References: <4dhuoj$cbe@shellx.best.com> <9602122.8425@mulga.cs.mu.OZ.AU> <4dudsf$187@cnn.Princeton.EDU> <ukvim4pceu.fsf@linda.teleport.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dcws100.comp.brad.ac.uk!cdahello
From: xian the desk lisard <cdahello@comp.brad.ac.uk>
Newsgroups: comp.lang.misc,comp.lang.perl.misc,comp.lang.tcl,comp.lang.c,comp.lang.java
Subject: Re: Relative Speed of Perl vs. Tcl vs. C
Date: Thu, 25 Jan 1996 12:47:23 +0000
Organization: University of Bradford
Message-ID: <Pine.SOL.3.91.960125124302.354D-100000@dcws100.comp.brad.ac.uk>
References: <4dhuoj$cbe@shellx.best.com> <9602122.8425@mulga.cs.mu.OZ.AU>
 <4dudsf$187@cnn.Princeton.EDU> <ukvim4pceu.fsf@linda.teleport.com>
NNTP-Posting-Host: dcws100.comp.brad.ac.uk
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: <ukvim4pceu.fsf@linda.teleport.com>