in reply to qr//i versus m//i
Note also that case-insensitive matching is always going to be much slower than case-sensitive matching, especially when UNICODE is involved. And in particular, case-sensitive matching of fixed strings, such as in your benchmark, is specifically optimised (the main regex engine isn't actually called - instead a Boyer-Moore matcher is called instead). Which is why your benchmark makes the case-insensitive match look particularly bad.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: qr//i versus m//i
by hazylife (Monk) on Feb 22, 2014 at 12:26 UTC |