in reply to Re: counting regex hits Benchamark
in thread counting regex hits
I know that it is well-known that tr is faster than m//
Except when it is not.
Quite impressive difference, isn't it?No. The difference is 1/18982.5th of second which isn't impressive at all. q-: The quotient looks impressive but benchmark has to go to a lot of work to be able to guess at that so you won't see a quotient anything close to that in practice.
Congratulations, you've now prematurely optimized this nano-operation.
I find that the difference is usually more indicative of the practical value of the optmization than the quotient.
- tye (cheap philosophy shouldn't cost a lot)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: counting regex hits Benchamark (except)
by Tomte (Priest) on Mar 19, 2003 at 07:38 UTC |