Mantis - Squeak
Viewing Issue Advanced Details
3380 Kernel minor always 03-29-06 01:28 05-05-06 22:10
nicolas cellier  
 
normal  
new 3.9  
open  
none    
none  
0003380: Interval hash/Equal problem
The never ending story of hash equal problems:

(1 to: 3) = #(1 2 3). "is true"
(1 to: 3) hash = #(1 2 3) hash. "is false"

This does break Set behaviour:

self assert:
  ((Set new: 4) add: (2 to: 4 by: 2); add: #(2 4); size) =
  ((Set new: 5) add: (2 to: 4 by: 2); add: #(2 4); size)
Efficient Interval hash should fall back to slow super hash... why ? because they have same species as Array... and thus compare to true with Array.

Maybe all SequenceableCollection hash should be refactored, because they hash each and every element, which might be a slow on big collections.

There is a balance between fast hash code computation / slow Set access because of hash code collision.
child of 0007002new  The Mother of all issues involving interval 

Notes
(0004884)
nicolas cellier   
05-05-06 22:10   
This bug is solved at 0003488