Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Longest possible run of a single character

by GrandFather (Saint)
on May 23, 2006 at 10:36 UTC ( [id://551122]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    sub RegexSort {
        return (length ((sort {length $b <=> length $a} $str =~ m[((.)\2+)
    +]g)[0]), -1);
    }
    
  2. or download this
    Index: Run from 701117 for 30
    Linear: Run from 701117 for 30
    ...
    Linear    1.05/s        --      -77%      -82%
    RegexSort 4.56/s      334%        --      -21%
    Index     5.77/s      450%       27%        --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://551122]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found