Perl: the Markov chain saw | |
PerlMonks |
Re: Can you write a faster code to perform this task?by Anonymous Monk |
on Sep 28, 2014 at 23:09 UTC ( [id://1102300]=note: print w/replies, xml ) | Need Help?? |
I just generated a file like the line you showed containing 80000 80-char lines; your code processed it in 0.3s. Even when I increased the line length to 1000 and the number of lines to 100k, the execution time stayed under a second. What kind of a speed gain are you looking for? Is the input and code you showed perhaps a simplified version of what you're actually doing? These kind of details do matter in optimizations.
In Section
Seekers of Perl Wisdom
|
|