in reply to Re^3: string pattern match, limited to first 1000 characters?
in thread string pattern match, limited to first 1000 characters?

It looks from your code that, apart from Fregex and Rregex, your subroutine pairs are identical as you haven't swapped the 'sgml' and 'html' around. When I run your code with them swapped around I get these results. (Rates are slow as the machine is a quite elderly SPARC.)

length of search string: 20904 Rate Rregex Fregex Rsubstr Rindex Fsubstr Findex Rregex 11708/s -- -16% -41% -45% -61% -70% Fregex 14005/s 20% -- -29% -35% -54% -64% Rsubstr 19721/s 68% 41% -- -8% -35% -50% Rindex 21423/s 83% 53% 9% -- -29% -45% Fsubstr 30362/s 159% 117% 54% 42% -- -22% Findex 39142/s 234% 179% 98% 83% 29% --

Cheers,

JohnGG

Update: Fixed typo.

Replies are listed 'Best First'.
Re^5: string pattern match, limited to first 1000 characters?
by roboticus (Chancellor) on Jun 24, 2007 at 14:04 UTC

    johngg:

    D'oh!++ and I thought I had. I wonder what I was thinking? I *know* I changed the lines, but I guess I changed 'sgml' to 'sgml' and 'html' to 'html'... (Or did I change it twice during my confusion? I guess we'll never know.)

    Thanks for catching that!

    ...roboticus