My assumption was that "pattern.re" in the loop may create a new regex from the string in each iteration. But maybe the compiler is indeed smart enough to avoid that. Generally we may investigate the search pattern in advance and fall back to plain string search when it is not a pattern. But I have currently no idea how we can easily decide if a string is a regex.
- To optimize operation of replacement of lines in the file Garry_Galler
- Re: To optimize operation of replacement of lines in ... Stefan_Salewski
- Re: To optimize operation of replacement of lines... Garry_Galler
- Re: To optimize operation of replacement of l... Stefan_Salewski
- Re: To optimize operation of replacement ... Garry_Galler
- Re: To optimize operation of replace... yglukhov
- Re: To optimize operation of rep... cblake
- Re: To optimize operation of... Stefan_Salewski
- Re: To optimize operation of... Garry_Galler
- Re: To optimize operation of... cblake
- Re: To optimize operation of... Garry_Galler
- Re: To optimize operation of... cblake
- Re: To optimize operation of... Garry_Galler
- Re: To optimize operation of... OderWat
- Re: To optimize operation of... Garry_Galler
- Re: To optimize operation of... OderWat
