With the sub:(Output = Alternation takes 0.000 seconds. Character class 0.001 seconds. )
I hope you didn't draw any conclusions from this "result"? It's clear that accuracy of your time measurement and/or output is too low to give you any gain in knowledge. If one of the values is there and the other is only one digit, you didn't really measure anything.
I'd recommend to use Benchmark, which adjusts the repetition counts if the accuracy is too low.
In reply to Re: Benchmarking regexes
by moritz
in thread Benchmarking regexes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |