in reply to Re: better (faster) way of writing regexp
in thread better (faster) way of writing regexp
Appended qw(:all) to use Benchmark line.
Changed 1e6 to -5 to run for 5 seconds, rather than a particular count ... not that it makes much difference.
Changed timethese to cmpthese to generate the following table.
Rate range repeat
range 483495/s -- -5%
repeat 507038/s 5% --
Rate range2 repeat2
range2 485834/s -- -4%
repeat2 506114/s 4% --
I wouldn't get excited about a 4% or 5% difference ... bet you're making 25% inefficiencies elsewhere, assuming you aren't using algorithmns that are costing you hundreds of %. I don't mean just you, anybody's code, including mine.
--
TTTATCGGTCGTTATATAGATGTTTGCA
|
|---|