Sorry,  forgot to format that.

Finally,  here's your initial test (unaltered),   run on my own machine for base-line comparison:

ddouville@linuxdld:~> ./test2.pl
Benchmark: timing 1000000 iterations of c_foob0or1, c_foobOrNowt, foob0or1, foobOrNowt...
c_foob0or1:  2 wallclock secs ( 1.92 usr +  0.00 sys =  1.92 CPU) @ 520833.33/s (n=1000000)
c_foobOrNowt:  1 wallclock secs ( 1.78 usr +  0.00 sys =  1.78 CPU) @ 561797.75/s (n=1000000)
  foob0or1:  0 wallclock secs ( 1.33 usr +  0.00 sys =  1.33 CPU) @ 751879.70/s (n=1000000)
foobOrNowt:  1 wallclock secs ( 1.34 usr +  0.00 sys =  1.34 CPU) @ 746268.66/s (n=1000000)
                 Rate   c_foob0or1 c_foobOrNowt   foobOrNowt     foob0or1
c_foob0or1   520833/s           --          -7%         -30%         -31%
c_foobOrNowt 561798/s           8%           --         -25%         -25%
foobOrNowt   746269/s          43%          33%           --          -1%
foob0or1     751880/s          44%          34%           1%           --

These test results agree with your test results,  supporting that your results are correct for the test you performed.  

In reply to Re: Re: Re: Difference between (foo|) and (foo)? by Anonymous Monk
in thread Difference between (foo|) and (foo)? by Derek2

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.