> Your random input entry is a 32-bit number. Two to the 32nd > power is 4GB. Let the 32-bit number represent the number of > a bit in a contiguous string of bits that is 4 billion bits > long. The number of bytes to contain this array is 537 MB, > which can easily be acquired above the bar or in a data > space. Find the byte address and bit offset within that byte > that corresponds to the 32-bit input number. Test the bit. > If off, you have a new entry, so turn the bit on and process > the new entry. If on, you have a duplicate entry, so ignore > the entry.
That must be the simplest solution and probably the fastest as well. But is there really no penalty for using so much storage? This table would probably use ten times as much storage as everything else in that address space. And what if dozens of address spaces (regions, batch jobs or whatever) would invoke this module...? Fred! ----------------------------------------------------------------- ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them. -----------------------------------------------------------------
