There is however no good reason for has_prefix to be faster than ^something once it is compiled.
/ Martin Nilsson (saturator)
Previous text:
2003-09-19 17:00: Subject: Re: Adding PCRE to Pike
Quite so. has_prefix() is about twice as fast as a regexp match for "^something", for instance, not counting the setup time to create a Regexp object. Knowing when to pick up your power drill and when to use some light handy tool will remain a practice worth picking up. :)
/ Johan Sundström, Lysator