Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

My results from gam3's script, second version:

/dev/null
                Rate        for     whyfor      while while_list   for_list
for         280029/s         --       -16%       -17%       -73%       -74%
whyfor      333697/s        19%         --        -1%       -68%       -69%
while       338448/s        21%         1%         --       -68%       -69%
while_list 1050567/s       275%       215%       210%         --        -3%
for_list   1079903/s       286%       224%       219%         3%         --
/usr/share/dict/words
             Rate        for     whyfor while_list      while   for_list
for        3.67/s         --       -39%       -41%       -42%       -51%
whyfor     5.99/s        63%         --        -4%        -5%       -21%
while_list 6.26/s        71%         5%         --        -0%       -17%
while      6.27/s        71%         5%         0%         --       -17%
for_list   7.56/s       106%        26%        21%        21%         --
/etc/passwd
              Rate     whyfor        for while_list      while   for_list
whyfor     13584/s         --       -13%       -17%       -30%       -56%
for        15664/s        15%         --        -5%       -19%       -49%
while_list 16411/s        21%         5%         --       -15%       -47%
while      19273/s        42%        23%        17%         --       -38%
for_list   30882/s       127%        97%        88%        60%         --

In reply to Re^2: Why is "for" much slower than "while"? by Xiong
in thread Why is "for" much slower than "while"? by di

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 taking refuge in the Monastery: (3)
As of 2024-04-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found