[Q]:Generate Unique ID's

Erik Max Francis max at alcyone.com
Sat May 24 22:25:14 EDT 2003


achrist at easystreet.com wrote:

> A trillion is only about 2 ^ 40.  Because of the sqrt, you only get
> about one collision in 2^(2*(64 - 40)) databases.  The age of the
> universe in seconds is within a few orders of magnitude of 2^48.
> You could get it to come out even by fudging the trillion up or
> down just a little.  I was off a little, I guess, and that makes it a
> much more interesting question:  Is one key collision every 100
> million years "close enough" to "never" for "practical purposes"?

It's a good question, and it's something you should ask yourself.  If a
key collision would be absolutely devastating (i.e., your application
would die horrible and stop working from that point on), then calculate
the average lifetime you expect your program to have and estimate the
probability of a collision during that time.

Then, it's a matter of drawing a line in the sand.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ If love is the answer, could you rephrase the question?
\__/  Lily Tomlin




More information about the Python-list mailing list