Perl: the Markov chain saw | |
PerlMonks |
Re^2: Faster and more efficient way to read a file vertically -- updatedby Laurent_R (Canon) |
on Nov 03, 2017 at 17:59 UTC ( [id://1202715]=note: print w/replies, xml ) | Need Help?? |
million of lines still probably fit in memory.Maybe. Or maybe not. But why take the chance? Especially with an AoA which has some extra cost. It is so easy to do everything in the first loop, when reading each line. And BTW, it is also probably faster, because using an array of arrays implies copying the data once more.
In Section
Seekers of Perl Wisdom
|
|