[darcs-users] Re: [zander at kde.org: Re: Re: Frustrations diffing against the last change to a file]

Thomas Zander zander at kde.org
Sun Apr 3 22:02:20 UTC 2005


On Sunday 03 April 2005 21:59, Jamie Webb wrote:
> On Sat, Apr 02, 2005 at 03:26:34PM -0800, Michael G Schwern wrote:
> > We don't need to be cryptographically secure, but we do need to
> > reasonably avoid collisions within a project.  I don't know how to run
> > the numbers to find out the odds of a collision.  Anyone?
>
> Patches in repo | Collision probability
> ----------------+----------------------
> 2048            | 0.00003
> 4096            | 0.00012
> 8192            | 0.00048
> 16384           | 0.00195
> 32768           | 0.00778
> 65536           | 0.03076
> 131072          | 0.11750
> 262144          | 0.39346
> 524288          | 0.86466
> 1048576         | 0.99966

Perhaps its not directly obvious so I want to point out that conflicts are 
not really an issue.  Wanting to print a patch by this number and finding 
out there happens to be a duplicate means you can only see the last 
committed one, you need the full hash for the other one.  Now; I don't know 
how often you look at patches longer then 65536 patches back, but I never 
in my life did.
In short; if you can keep below that 3% chance for *all* real life 
situations then this is just fine, I'd even say that less bits would be 
fine as well.
Oh; and partial repo's naturally have an even lower chance of collision.

-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20050404/27617c4c/attachment.pgp 


More information about the darcs-users mailing list