![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re: push to array without copyingby chris212 (Scribe) |
on Nov 15, 2016 at 21:20 UTC ( #1175953=note: print w/replies, xml ) | Need Help?? |
I found that "printf" was not the most efficient way to format fixed-width data. It was faster to append whitespace padding or truncate with a regex as needed. Probably since it modifies the variable in-place and it doesn't need to parse a format string. This allowed me to try using an array of references, but I saw no performance improvement. I also see no performance improvement deleting the value from the hash when pushing it to an array.
In Section
Seekers of Perl Wisdom
|
|