
Keep It Simple, Stupid

Comment on

You can use Bit::Vector, but I suspect that would be a good deal slower.

There wouldn't be any need to do that. With 32-bit ints, a full run would take around 7 hours. With 64-bit ints, it would take around 3 million years.

If you switched to using unpack to count the bits:

$tailCnt[ unpack '%32b*', pack 'N', $collection ]++;

Then the full 32-bit comes down to a very reasonable 40 minutes, but that still leaves the full 64-bit requiring several hundred thousand years.

In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^2: Monte Carlo - Coin Toss by BrowserUk
in thread Monte Carlo - Coin Toss by James_H

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (3)
    As of 2014-03-14 00:41 GMT
    Find Nodes?
      Voting Booth?

      Have you used a cryptocurrency?

      Results (293 votes), past polls