Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
umhmm you got my typo. i accidentally used $string instead of $str in my post first. that explains the high rates for the regex solution. here is the timing with the typo corrected:
Rate split_pos grep_split substr_map regexo regex subst +r_loop unpack split_pos 5587/s -- -65% -69% -76% -77% + -79% -81% grep_split 15974/s 186% -- -12% -32% -34% + -40% -45% substr_map 18051/s 223% 13% -- -23% -26% + -32% -38% regexo 23474/s 320% 47% 30% -- -3% + -12% -20% regex 24272/s 334% 52% 34% 3% -- + -9% -17% substr_loop 26596/s 376% 66% 47% 13% 10% + -- -9% unpack 29240/s 423% 83% 62% 25% 20% + 10% --

--
"WHAT CAN THE HARVEST HOPE FOR IF NOT THE CARE OF THE REAPER MAN"
-- Terry Pratchett, "Reaper Man"


In reply to Re^3: Splitting a string to chunks by Fengor
in thread Splitting a string to chunks by spurperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found