in reply to Re: is index faster than regexp for fixed text token?
in thread is index faster than regexp for fixed text token?

I don't know, I definitely get a big difference. This is with Perl 5.10.0
Without study: Rate index regexp index 466/s -- -27% regexp 639/s 37% -- With study: Rate index regexp index 467/s -- -54% regexp 1019/s 118% --
Doesn't it make sense that regexp has an advantage in 5.10 since it is building a trie like Regexp::Assemble?

SSF

Replies are listed 'Best First'.
Re^3: is index faster than regexp for fixed text token?
by ikegami (Patriarch) on Jul 06, 2009 at 16:36 UTC
    There's no trie involved since there's no alternation.