Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,598 of 243,242    |
|    Janis Papanagnou to BGB    |
|    Re: srand(0)    |
|    25 Dec 25 09:51:14    |
      From: janis_papanagnou+ng@hotmail.com              On 2025-12-25 06:09, BGB wrote:       > On 12/24/2025 5:22 AM, BGB wrote:       >>       >> Some people seem to really like using lookup tables.              Of course; they can speed up things significantly. And simplify       the operations for contemporary data sizes (bytes, 64 bit words,       etc.).              >       > I don't really get the point of lookup table driven RNGs.              In e.g. bit-oriented algorithms (e.g. based on LFSR) you can speed       up processing significantly by processing larger quantities (like       octets/bytes) and processing/accessing values then byte-wise.[*]              Someone already mentioned that a bit-wise operating PN-generator       for random numbers could make use of such a table driven approach.       (You can extend that principle to larger quantities than bits, e.g.       to gain from larger processor word lengths, especially it you need       those larger entities as result in the first place.)              > A lot of these ones are, say, a table with 256 spots, and an index.       > Each time one generates a random number (usually a byte), it returns the       > value at that location in the table and advances to the next index.       >       > Sometimes some get clever and use an algorithm to jitter the table index.       >       > I have mostly seen this strategy used in old game engines.       >       > These typically fail the image test as by design they give repeating       > patterns.       >       > [...]              Janis              [*] Here's some old "C" example for a CRC-16 using table-lookup...       http://random.gridbug.de/ccitt_crc16.c              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca