3 ms·
Perl is terse, and fast. The speed difference between perl and python might mean peanuts these days, but it's still true more often than not. Perl programs ki
by burgerbrain 16y ago
Perl is terse, and fast. The speed difference between perl and python might mean peanuts these days, but it's still true more often than not. Perl programs kick off far faster for instance (`time perl < /dev/null` `time python < /dev/null`) which can become important in some (not so hard to imagine) situations.
Perl also functions far better as a systems scripting language. Compare filtering a perl string through a Unix filter (perhaps an Awk program, another perl program, whatever) to the same thing in python. The difference is night-and-day.
- BCM43 16y ago$ time perl < /dev/null real 0m0.033s user 0m0.004s sys 0m0.000s $ time python < /dev/null real 0m0.017s user 0m0.004s sys 0m0.012s $ time perl < /dev/null real 0m0.002s user 0m0.004s sys 0m0.000s $ time python < /dev/null real 0m0.017s user 0m0.016s sys 0m0.000s $ time perl < /dev/null real 0m0.002s user 0m0.000s sys 0m0.004s $ time python < /dev/null real 0m0.017s user 0m0.008s sys 0m0.008s That's interesting. The first time perl is a lot slower, but further runs are a lot faster, while python starts medium and stays there. I tested this on more than one computer and results followed the same pattern.
- ay 16y agoI think the delay is the seek time of your disk the first time it loads perl; and the python was already cached. (OT: the Lua startup time is half of Perl's)
- lawnchairlarry 16y agoEven so, with either one at such negligible speeds, that has to be about the worst justification for any language I've heard.