in reply to Re: Faster regex to split a string into runs of similar characters?
in thread Faster regex to split a string into runs of similar characters?
Never would have thought of that! It yeilds another nice chunk of savings in the real application:
C:\test>\perl22\bin\perl 1176081.pl -WIDTH=1000 -HEIGHT=1000 yr() took 2.551594 buk() took 1.068262 buk2() took 0.681494 buk3() took 0.167000 dave() took 0.127978
Thanks.
On a related note: Any ideas why this:
while( substr( $$str, $y * $WIDTH, $WIDTH ) =~ m[((.)\2*)]mg ) { ...
Works (runs to completion, produces the desired results) on 5.10.1, but silently loops forever in 5.22.0?
This works in 5.22.0:
my $ref = \substr( $$str, $y * $WIDTH, $WIDTH ); while( $$ref =~ m[((.)\2*)]mg ) {
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Faster regex to split a string into runs of similar characters?
by dave_the_m (Monsignor) on Nov 21, 2016 at 14:16 UTC |