Take a look [Only registered and activated users can see links. Click Here To Register...]. There are several fast implementations. I currently don't know which is the fastest, but you may just compile and execute the benchmark project to find that out.
With best regards
Jeoni
03/18/2017 06:31Dr. Coxxy#3
most times the speed of pattern finding functions is totally irrelevant if you haven't got a logic flaw in your code.