[ENH] HashCollisionsCheck

Stephan Rudlof sr at evolgo.de
Mon Aug 26 00:33:29 UTC 2002


This is an improvement of my last [ENH] with the same topic.

"Change Set:		HashCollisionsCheck
Date:
		26 August 2002
Author:
		Stephan Rudlof

The provided methods check instances of Set for potential hash problems.

Inspect:
	Set findHashCollisions
	Set findHashCollisionsModuloCapacity

Set>>findHashCollisions computes raw hash collisions,
Set>>findHashCollisionsModuloCapacity computes collisions resulting after
hash \\ capacityOfSet.
The latter computes the collisions arising in the *current* implementation
of Sets: it illuminates potential problems steming from patterns in the hash
distribution.

Results are returned as aSortedCollection of associations;
Set>>findHashCollisions
	#((collisions/size) size capacity) -> instanceOfSetWithCollisions
,
Set>>findHashCollisionsModuloCapacity
	#((collisionsModuloCapacity/capacity) size capacity) ->
instanceOfSetWithCollisions
.
In (collisionsModuloCapacity/capacity) capacity is a better divisor as size,
since capacity is the size of the array used to store the to be hashed items.
"
-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HashCollisionsCheck.2.cs.gz
Type: application/x-gunzip
Size: 1102 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020826/81ba112a/HashCollisionsCheck.2.cs.bin


More information about the Squeak-dev mailing list