http://qs321.pair.com?node_id=40878


in reply to (tye)RE: perl
in thread perl

There is all kinds of hard in the world:
root# ls -l `which perl`
-rwxr-xr-x    3 root     root       733687 Apr 15  2000 /usr/bin/perl
root# ls -l `which grep`
-rwxr-xr-x    1 root     root        75600 Feb  3  2000 /bin/grep

One of them is footprint. I love perl, but it's a big stick to hit grep with. =)

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
(tye)RE2: perl
by tye (Sage) on Nov 10, 2000 at 06:36 UTC

    I don't think you realize what it takes to make the Perl regex engine work. You can't just rip it out of Perl. To make it work you'd probably end up just embedding perl into an executable, which would require even more footprint.

    Besides, every good system should have Perl so the footprint you should be comparing is grep.pl vs. grep.exe (to borrow a file naming convention from a different platform). I think the pendulum will swing the other way. :)

    Update: The two grep's weigh in a 16K and 820 bytes (smaller than grep.exe or much, much smaller).

            - tye (but my friends call me "Tye")
      however, the loading time for the 70k grep is going to be 1/10 the loading time for the perl'd grep (perl'd grep requiring the loading of a 700k interpreter as well as the compilation and execution). As powerful as perl is, and even if the script is only 820 bytes, it still has to load the 700k interpreter before it even gets to the grep, by that time, we've loaded the grep and are chugging through the file with the native binary.