in reply to Re^4: How to optimize a regex on a large file read line by line ?
in thread How to optimize a regex on a large file read line by line ?

Hi ! You have all my code and my number, i can't give more ! On My machine, Grep+Wc are the faster. And the line by line solution are also faster than puttin all the lines in memory, then searching. Cheers.
  • Comment on Re^5: How to optimize a regex on a large file read line by line ?

Replies are listed 'Best First'.
Re^6: How to optimize a regex on a large file read line by line ?
by Anonymous Monk on Apr 20, 2016 at 20:48 UTC

    marioroy has found that the bigbuffer method (found in http://ideone.com/LzaQI0) runs in 7.8 seconds on his machine, vs the 10.71 seconds you get for grep+wc. What's not known is the relative speed of the two machines. Unfortunately, my machines are in storage while I'm moving, and I'm stuck on this tiny tablet, so I can't run any benchmarks myself. So I ask again, please, can you adopt and run the above code on your machine so we can get accurate results for both the above bigbuffer technique and grep+wc?