How do I get random #s?

T. William Wells bill at twwells.uucp
Thu Feb 16 20:13:56 AEST 1989


In article <619 at dms.UUCP> albaugh at dms.UUCP (Mike Albaugh) writes:
:       I would think that a better approach would be to generate the
: whole stream ahead of time (with timings info as to _when_ commands
: are entered), or to log it (again with timestamps) as it is generated.
: Then a hardware, software, or "thousand monkeys" (software test group
: of "naive users") method can be used at will, and re-play for regression
: testing would be a snap.

This is not practical if the generated stream is very large. For
example, when I do this kind of testing on a memory allocator, the
number of requests might well be in the millions or billions.

Even if the disk space existed to store such, the time needed to read
it in would dwarf the time needed to regenerate the stream with the
random number generator.

---
Bill
{ uunet!proxftl | novavax } !twwells!bill



More information about the Comp.lang.c mailing list