The Trunk: Collections-ul.294.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-ul.294.mcz

commits-2
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.294.mcz

==================== Summary ====================

Name: Collections-ul.294
Author: ul
Time: 5 February 2010, 4:45:13.443 am
UUID: 0f626993-dbbf-c04f-bd77-a60413399496
Ancestors: Collections-ul.293

- fix #growSize in WeakSet and WeakKeyDictioanry
Since we are using self slowSize (which is like tally in not weak collections) instead of array size we should multiply slowSize by 4/3 and 4/3*3/2 is 2.

=============== Diff against Collections-ul.293 ===============

Item was changed:
  ----- Method: WeakSet>>growSize (in category 'private') -----
  growSize
  "Answer what my next table size should be.
  Note that, it can be less than the current."
 
+ ^self class goodPrimeAtLeast: self slowSize * 2 + 2!
- ^self class goodPrimeAtLeast: self slowSize * 3 // 2 + 2!

Item was changed:
  ----- Method: WeakKeyDictionary>>growSize (in category 'private') -----
  growSize
  "Answer what my next table size should be.
  Note that, it can be less than the current."
 
+ ^self class goodPrimeAtLeast: self slowSize * 2 + 2!
- ^self class goodPrimeAtLeast: self slowSize * 3 // 2 + 2!