View Single Post
Old Jun 2nd, 2006, 1:09 PM   #1
chepfaust
Programmer
 
chepfaust's Avatar
 
Join Date: Feb 2005
Posts: 62
Rep Power: 4 chepfaust is on a distinguished road
[vb6] need advice concerning a largescale non-recurring random number generator

i'm trying to come up with a pseudo random-number generator that will not generate duplicate numbers.

this number generator will generate a series of numbers. it can be 10 random numbers, or it could be well over 10000.

to make a NG for the smaller end of the spectrum (10) is no big deal; i'd just run a for() loop to check newly generated values against those previously stored in an array. it's when i have to generate 1000+ numbers that i fear i'm going to have memory issues on older machines.

i don't think a for() loop is going to cut it. can anyone give me some advice on how to go about making a memory-efficient, largescale random number generator?

i think i read somewhere that you could use the current time to come up with continuously unique numbers or something. don't remember where i read it or what the details were. might this be relevant?

thanks
chepfaust is offline   Reply With Quote