$ for i in 99999996 99999997 99999998 99999999; do for j in 1999 2001 +2002 2003 2004; do echo $i $j; ./bitstrstr test.dat $i $j 100; done; +done 99999996 1999 needle found at 99999996, expected at 99999996 in 11.7/100 = 0.117ms 99999996 2001 needle found at 99999996, expected at 99999996 in 11.7/100 = 0.117ms 99999996 2002 needle found at 99999996, expected at 99999996 in 11.6/100 = 0.116ms 99999996 2003 needle found at 99999996, expected at 99999996 in 12.1/100 = 0.121ms 99999996 2004 needle found at 99999996, expected at 99999996 in 12/100 = 0.12ms 99999997 1999 needle found at 99999997, expected at 99999997 in 11.5/100 = 0.115ms 99999997 2001 needle found at 99999997, expected at 99999997 in 13.2/100 = 0.132ms 99999997 2002 needle found at 99999997, expected at 99999997 in 11.5/100 = 0.115ms 99999997 2003 needle found at 99999997, expected at 99999997 in 11.8/100 = 0.118ms 99999997 2004 needle found at 99999997, expected at 99999997 in 11.6/100 = 0.116ms 99999998 1999 needle found at 99999998, expected at 99999998 in 911.9/100 = 9.119ms 99999998 2001 needle found at 99999998, expected at 99999998 in 12.2/100 = 0.122ms 99999998 2002 needle found at 99999998, expected at 99999998 in 13.2/100 = 0.132ms 99999998 2003 needle found at 99999998, expected at 99999998 in 11.7/100 = 0.117ms 99999998 2004 needle found at 99999998, expected at 99999998 in 12.6/100 = 0.126ms 99999999 1999 needle found at 99999999, expected at 99999999 in 12/100 = 0.12ms 99999999 2001 needle found at 99999999, expected at 99999999 in 912.1/100 = 9.121ms 99999999 2002 needle found at 99999999, expected at 99999999 in 12.5/100 = 0.125ms 99999999 2003 needle found at 99999999, expected at 99999999 in 12.6/100 = 0.126ms 99999999 2004 needle found at 99999999, expected at 99999999 in 12.2/100 = 0.122ms

In reply to Re^15: [OT] The interesting problem of comparing (long) bit-strings. by salva
in thread [OT] The interesting problem of comparing bit-strings. by BrowserUk

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.