Hi, I immediately tried the attached patch, and was able to confirmthat grep perfomance is improved.
Our work to find thousands of patterns in a file with tens of thousand lines is going extremely smoothly. I'm glad for your quick response. Thank you.