[Ecls-list] Name of init function.

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sat May 31 08:13:49 UTC 2008


On Sat, May 31, 2008 at 2:37 AM, Waldek Hebisch
<hebisch at math.uni.wroc.pl> wrote:
> 1) Probablity of collision (assuming uniform distribution) is of order
>   n^2/(2*m) where n is number of names we need and m is range of hash
>   function.  If n=10000 and m=2^32, then probability is bigger than
>   1/100, so in prolonged use we will almost surely get a collision.
>   IMHO this shows that 32 bit hash is definitly too short.

Yes, but the thing is that you are not going to build 10000 files in 1
millisecond, which is why the timestamp is there. Note that the
timestamp is not perfect -- I get it from get-internal-real-time until
I code a better time function, cause first I must research which
functions are portable.

The important point when I designed the hash function is that we do
not have that much information to hash over: a file name and a time
stamp. I do not feel we can ensure safety with respect to different
users merging modules compiled on different machines, for instance, as
people tend to have rather uniform and similar arrangement of files.
Hence, we may try to ensure safety with respect to building on the
same system.

BTW, I am right now conducting research on the hash function itself.
There are two different ways to use it: propagate the hash key or
merge it from different components in an object. It is not yet clear
which one is better.

Please correct me if you find a better idea.

Juanjo

-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list