I am looking for algorithm for which implementation is readily available in C. My input consists of many patterns & many texts. I want to find first occurrence of each pattern in each of the texts.
I am exploring string matching algorithms from here: http://igm.univ-mlv.fr/~lecroq/string/
But not sure of the best possible solution. Does anybody know the best matching algorithm for this use case?
My patterns will be in the range of 10-15 chars & texts will be in the range of 30-40 chars.
Also some of the stackoverflow answers mention that Boyes-Moore & KMP don't necessarily performs better than the strstr() because of modern day HW architectures. Will that be true for my peculiar use case as well?
Here is another list of algorithms. http://www.dmi.unict.it/~faro/smart/algorithms.php