in reply to High Performance Perl
1. The "script compilation phase" of running a Perl script is NOT the cause of it's slowness, compared to C. What makes Perl run a bit slower than C, is that Perl stores all variables in structures, which hold the variable, along with it's attributes, like type of variable, number of references, etc. This slows Perl down, when running long computation intensive scripts. However, this very same thing also makes Perl easier write and use. Try doing some simple tasks in C or C++, and you end up spending half your programming time trying to figure out "casts" and tracking what form digital data is currently in. It is why so many C, C++ programmers switch to using Perl, (or other scripted language). There is also the "buffer overflow" problem, which plagues C, which is just a "distant memory" for Perl programmers.
2. If you need more speed, it is far more economical just to buy a faster motherboard and harddrive. A Perl script running on a 2 Ghz machine with SCSI harddrives, will generally outperform a C program running on a 500 Mhz machine with IDE drives. So you can upgrade hardware for $300, instead of paying a C programmer $500 a week to boost your performance by 500 milliseconds per run.
Of course there is always the place for C, in the underlying libraries, etc., but in general, Perl performance is very fast just the way it is, (assuming you write scripts correctly). :-)
|
|---|