![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Your approach is not bad at all; you are trading memory versus a much higher access speed than the actual generation might require. The use of a data file allows for simple tweaking of the data distribuition just by altering the number of elements in the file.
I'd extend it by randomizing based on the actual number of item read from file, and I'd load the file at startup without touching it anymore; this way your program will be fast. Or of course you could use one of the statistical modules... In reply to Re: Efficient ways of storing a data set for random access
by l3nz
|
|