According to perlreguts, the RE engine also uses fbm_index() to scan for the leftmost atom. There shouldn't be any reason why the performance of the two should differ by a large margin, and I would expect the regular expression to be a bit slower in the general case due to the setup. So I think it's either that your data somehow favours a branch in the RE engine that goes to fbm_index faster, or that the benchmark is not measuring what you want. But I also vaguely remember some thread about such a discrepancy on this site, but I can't find it is index faster than regexp for fixed text token?.
git blame tells me nobody touched index since 2009, and that change was some refcounting change. The other changes were in 2006.
In reply to Re^3: How Index function works??
by Corion
in thread How Index function works??
by saranrsm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |