Just another Perl shrine | |
PerlMonks |
Re: Optimizing existing Perl code (in practise)by Abigail-II (Bishop) |
on Aug 19, 2002 at 16:22 UTC ( [id://191228]=note: print w/replies, xml ) | Need Help?? |
I'd never choose the second method. With the first, it's
immediately clear what it does. With the second, it isn't.
And somehow I doubt it's faster - it certainly doesn't look
like it, as you first make a list of all the lines, then
join them together, meaning you get more than double the
memory usage. I'd rather do
"Still do it in Perl" isn't a goal, IMO. Abigail
In Section
Seekers of Perl Wisdom
|
|