Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Can you write a faster code to perform this task?

by AnomalousMonk (Archbishop)
on Sep 28, 2014 at 23:03 UTC ( [id://1102297]=note: print w/replies, xml ) Need Help??


in reply to Can you write a faster code to perform this task?

You'll have to Benchmark it yourself to see if it's any faster, but maybe:

c:\@Work\Perl\monks>perl -wMstrict -le "$_ = 'iiiiiiiiMMMMMMMMMMMooooooooooooMMMMMMMMMMiiiiiMMMMMMMMoooo'; my $count =()= $_ =~ m{ M+ }xmsg; print $count; " 3

Log In?
Username:
Password:

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

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

    No recent polls found