Skip to content

Instantly share code, notes, and snippets.

@mpeters
Created February 26, 2010 16:40
Show Gist options
  • Save mpeters/315884 to your computer and use it in GitHub Desktop.
Save mpeters/315884 to your computer and use it in GitHub Desktop.
String of three characters
--------------------------------------------------------------------------------
using a quotemeta regex 277778/s -- -6% -56%
using a regex 294118/s 6% -- -53%
using eq 625000/s 125% 112% --
String of five characters
--------------------------------------------------------------------------------
using a quotemeta regex 250000/s -- -17% -60%
using a regex 303030/s 21% -- -52%
using eq 625000/s 150% 106% --
String of nine characters
--------------------------------------------------------------------------------
using a quotemeta regex 250000/s -- -15% -62%
using a regex 294118/s 18% -- -56%
using eq 666667/s 167% 127% --
String of seven characters
--------------------------------------------------------------------------------
using a quotemeta regex 270270/s -- -8% -59%
using a regex 294118/s 9% -- -56%
using eq 666667/s 147% 127% --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment