in reply to Can you write a faster code to perform this task?
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.
|
|---|