[NBLUG/talk] I hate perl. :-)

Robert P. Thille rthille at rangat.org
Thu Jun 1 11:05:48 PDT 2006

Eric Eisenhart wrote:

> Perl is obviously much slower.  7:2 speed ratio.  Perl's gotta compile, then
> it runs it's funny bytecode language, etc...
> Something bigger, perhaps:
> $ time ./linecount < /usr/lib/libperl.a
> 3608
> real    0m0.600s
> user    0m0.600s
> sys     0m0.000s
> Over half a second.
> $ time ./linecount.pl < /usr/lib/libperl.a
> 3609
> real    0m0.076s
> user    0m0.060s
> sys     0m0.010s
> What's this?  Perl's now faster than C?  Well, of course it is, my Perl
> program has a highly optimized set of I/O routines that outsmart me behind
> the scenes by prereading big old chunks of file in sizes the OS likes, and
> my program processes things a line at a time instead of a character at a
> time.
Or perl is faster because of the buffer cache on linux...assuming you 
ran them in the order they are listed.


More information about the talk mailing list