Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes: * Moved IdentityMap from Array to Rubinius. * IdentityMap now supports re-mapping (#redistribute) when the entries exceed a certain threshhold. This happens automatically. The size is never reduced, however, because this is not a realistic need for the current use. Should this become necessary, it would be fairly simple to add to the #delete method as #redistribute could grow or shrink without any modification. * The basic structure is a hybrid table of direct entries and rows mixed. On collision, the entry in the main table is promoted to a row and the colliding entry is added there. * Deleting merely sets the entry for the item's hash value to nil. Under highly mutable loads (ie many inserts and deletes), this could lead to significant fragmentation. There are several ways this could be handled but, again, that is not in the current use cases. * There is a slightly higher cost for small structures due to this being actually mutable rather than fixed. However, there is significantly greater performance as the load grows due to not having the spill array. Overall, this structure is much more robust.
- Loading branch information