Hi Gene, and thanks for your reply! Yes, I had thought of something like that. However, it seems sort of cumbersome to me: I guess I would want to split the 32-bit integer by means of 32 bitwise ands... Or probably there's a smarter way.
Anyway, if the random integers come in bunches of 16 I'd have to rewrite some code (I do not know in advance how many integer I need to complete my task). First thing that comes to mind is adding a counter for the "spent" random integers and generating a new batch of them when all of them have been used. Nothing too difficult, althoug a bit cumbersome. And I'm wondering whether I'd end up with a significant increase in speed. I'll make some experiment Thanks again F On Dec 8, 3:14 am, Gene <[email protected]> wrote: > Well for one thing if your rng is very good you can use a single 32- > bit integer to generate 16 numbers in [0..3]. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
