Robin Sheat wrote:
On Tue, Apr 27, 2004 at 02:31:34AM -0400, Randy W. Sims wrote:

Perl is implemented in C. It can only be as fast as C, assuming a competent C programmer.

However, I imagine there are situations where a programmer who doesn't optimise for speed (or isn't a great programmer) will end up with Perl being faster in some situations, assuming the C that Perl is written in was done by a good, efficiency concious programmer. For example, it would be easy to come up with a less-than-tuned hash implementation in C that runs slower than somebody who just used Perl to do stuff with hashs.


Whether this is realistic or not, I don't know.


Definately. There was a book (I think it was "The Practice of Programming" by Kernigan & Pike) where some comparisons were made and perl actually came out ahead in some cases. Perl is highly tuned and very fast at many tasks. My argument was meant more as a logical argument: since perl is implemented in C, the C must be as fast as perl. In practice, things are never quite so simple.


Randy.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to