Does anyone have any idea why C regular expressions are so slow!? I had a simple regular expression:
/interest.*_/
It is a very basic reg. exp. that matches things like:
interests_
interest_
interesting_
In C using regex.h on a 4736 line file each with an occurence of "interest" it takes 1.33 seconds.
In perl it takes 0.14 seconds!
Now I don't know what to do? I need C but I need fast regular expressions! Any ideas? Does anyone know of a good mechanism for calling a perl program in C and returning a value from the perl program to the C calling program?
Or alternatively, a way to speed up C regular expressions?
Thanks,
-bitwise
/interest.*_/
It is a very basic reg. exp. that matches things like:
interests_
interest_
interesting_
In C using regex.h on a 4736 line file each with an occurence of "interest" it takes 1.33 seconds.
In perl it takes 0.14 seconds!
Now I don't know what to do? I need C but I need fast regular expressions! Any ideas? Does anyone know of a good mechanism for calling a perl program in C and returning a value from the perl program to the C calling program?
Or alternatively, a way to speed up C regular expressions?
Thanks,
-bitwise