[ 
https://issues.apache.org/jira/browse/UIMA-4206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marshall Schor resolved UIMA-4206.
----------------------------------
    Resolution: Fixed

> IntHashSet table expansion should account for removed items better
> ------------------------------------------------------------------
>
>                 Key: UIMA-4206
>                 URL: https://issues.apache.org/jira/browse/UIMA-4206
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.7.0SDK
>
>
> When items are removed from the IntHashSet, special "placeholders" take their 
> place (and take up a slot in the table). When the table needs expanding due 
> to the load factor, the copying into the new table will drop these 
> placeholders, thus "reclaiming" the space.  Resizing is triggered by the size 
> + nbrRemoved exceeding the load factor.  If the nbrRemoved is >= size, then 
> keeping the same size table (instead of doubling it's size) will bring the 
> load factor down to what it would have been in the absence of removes, when 
> the table size was doubled.  Change the reallocate to keep the size in this 
> case (but still do the copying - which cleans up the removal placeholders).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to