Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: how to count the number of repeats in a string (really!)

by Krambambuli (Curate)
on Nov 14, 2007 at 17:56 UTC ( [id://650810]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    Benchmark: timing 2000 iterations of Krambambuli, blazar...
    Krambambuli:  4 wallclock secs ( 3.28 usr +  0.01 sys =  3.29 CPU) @ 6
    +07.90/s (n=2000)
        blazar:  1 wallclock secs ( 0.80 usr +  0.00 sys =  0.80 CPU) @ 25
    +00.00/s (n=2000)
    
  2. or download this
    
    use strict;
    ...
        $count{$_} == 1 and delete $count{$_} for keys %count;
        \%count;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found