Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Check randomly generated numbers have not been used before

by oiskuu (Friar)
on Jun 20, 2014 at 23:22 UTC ( #1090708=note: print w/ replies, xml ) Need Help??


in reply to Re: Check randomly generated numbers have not been used before
in thread Check randomly generated numbers have not been used before

In that case, just store the srand seed and recreate the bitmap as needed.


Comment on Re^2: Check randomly generated numbers have not been used before
Re^3: Check randomly generated numbers have not been used before
by BrowserUk (Pope) on Jun 21, 2014 at 00:52 UTC
    just store the srand seed and recreate the bitmap as needed.

    It takes 25 milliseconds to write the (10 million bit) bitmap out and then read it back.

    It takes over 20 85 207 minutes to recreate the first million picks.

    Math::Random::MT is excellent; but it's not fast.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1090708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2014-12-28 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls