There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
unpack is the way to go, but one tip is that unpack 'a3' x $n, $str runs a few percent quicker than unpack '(a3)*', $str if you know in advance how many fields there are. Also, if your problem allows you to unpack the strings just in time at the point where you need them, rather than en masse, avoiding the allocation, creation and destruction of 10 million concurrent small arrays -- even if you have ample memory for them -- can save a significant amounts of time. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re: Fast Way to Split String in to Chunk of Equal Length
by BrowserUk
|
|