Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Given the way various solutions are likely to scale it's worth running the benchmark for a range of values:

length: 5, ones: 3 Rate Eily Eily_LanX choroba tybalt89 johngg GrandFather + tybalt89_re salva Eily 5209/s -- -8% -26% -35% -64% -67% + -70% -87% Eily_LanX 5640/s 8% -- -20% -29% -61% -64% + -67% -86% choroba 7013/s 35% 24% -- -12% -52% -56% + -59% -82% tybalt89 7967/s 53% 41% 14% -- -45% -49% + -54% -80% johngg 14517/s 179% 157% 107% 82% -- -8% + -15% -64% GrandFather 15765/s 203% 179% 125% 98% 9% -- + -8% -60% tybalt89_re 17169/s 230% 204% 145% 116% 18% 9% + -- -57% salva 39798/s 664% 606% 468% 400% 174% 152% + 132% -- length: 10, ones: 3 Rate choroba Eily Eily_LanX tybalt89 johngg tybalt89_re +GrandFather salva choroba 138/s -- -67% -74% -78% -83% -86% + -92% -95% Eily 420/s 204% -- -21% -33% -48% -56% + -76% -86% Eily_LanX 533/s 286% 27% -- -15% -34% -44% + -69% -82% tybalt89 626/s 353% 49% 17% -- -23% -34% + -64% -79% johngg 809/s 485% 93% 52% 29% -- -15% + -54% -73% tybalt89_re 955/s 591% 127% 79% 53% 18% -- + -45% -69% GrandFather 1744/s 1161% 315% 227% 178% 115% 83% + -- -43% salva 3041/s 2098% 623% 470% 385% 276% 218% + 74% -- length: 15, ones: 3 Rate choroba Eily tybalt89 Eily_LanX tybalt89_re johngg +GrandFather salva choroba 7.07/s -- -95% -96% -96% -96% -98% + -99% -99% Eily 131/s 1745% -- -17% -23% -26% -62% + -84% -87% tybalt89 157/s 2125% 21% -- -8% -11% -55% + -81% -85% Eily_LanX 171/s 2311% 31% 8% -- -3% -51% + -80% -84% tybalt89_re 177/s 2397% 35% 12% 4% -- -49% + -79% -83% johngg 347/s 4807% 166% 121% 104% 97% -- + -58% -66% GrandFather 834/s 11693% 539% 430% 389% 372% 140% + -- -19% salva 1036/s 14548% 694% 558% 508% 487% 198% + 24% -- length: 20, ones: 3 Rate Eily tybalt89_re tybalt89 Eily_LanX johngg GrandFa +ther salva Eily 39.2/s -- -27% -35% -40% -71% +-89% -91% tybalt89_re 54.0/s 38% -- -11% -17% -59% +-85% -87% tybalt89 60.7/s 55% 12% -- -7% -54% +-83% -86% Eily_LanX 65.3/s 67% 21% 8% -- -51% +-82% -85% johngg 133/s 240% 147% 120% 104% -- +-62% -69% GrandFather 355/s 806% 557% 485% 443% 166% + -- -17% salva 427/s 990% 691% 604% 554% 220% + 20% -- length: 30, ones: 3 Rate tybalt89_re Eily tybalt89 Eily_LanX johngg salva G +randFather tybalt89_re 10.7/s -- -4% -26% -38% -71% -91% + -91% Eily 11.2/s 5% -- -23% -35% -70% -90% + -91% tybalt89 14.5/s 36% 30% -- -16% -61% -87% + -88% Eily_LanX 17.4/s 62% 55% 19% -- -53% -85% + -86% johngg 37.2/s 247% 232% 156% 114% -- -68% + -69% salva 115/s 976% 929% 693% 564% 210% -- + -4% GrandFather 120/s 1020% 971% 726% 591% 223% 4% + -- length: 40, ones: 3 Rate tybalt89_re Eily tybalt89 salva Gra +ndFather tybalt89_re 3.40/s -- -22% -33% -93% + -94% Eily 4.37/s 29% -- -13% -91% + -92% tybalt89 5.04/s 48% 15% -- -90% + -91% salva 48.4/s 1323% 1007% 859% -- + -15% GrandFather 56.8/s 1572% 1201% 1027% 18% + -- length: 60, ones: 3 (warning: too few iterations for a reliable count) Rate tybalt89_re Eily tybalt89 Eily_LanX salva G +randFather tybalt89_re 0.676/s -- -34% -41% -69% -95% + -96% Eily 1.02/s 51% -- -10% -52% -92% + -94% tybalt89 1.14/s 69% 12% -- -47% -91% + -93% Eily_LanX 2.15/s 219% 110% 89% -- -84% + -87% salva 13.4/s 1888% 1212% 1076% 524% -- + -17% GrandFather 16.2/s 2303% 1486% 1322% 654% 21% + --

choroba was dropped about half way through because it was slowing down dramatically. johngg dropped out after 30 because with a 32 bit Perl it only works out to a length of 32.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

In reply to Re^2: Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's [Updated] by GrandFather
in thread Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's by Lana

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? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2022-12-09 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?