[
https://issues.apache.org/jira/browse/LUCENE-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801295#action_12801295
]
Paul Elschot commented on LUCENE-2217:
--------------------------------------
Indeed, the patch isn't quite right. I'll fix that and provide another patch.
All test cases pass though, so I'll also try and
add a test case that fails when an allocation larger than the current initial
size is needed.
The MAX_BYTE_PER_INT has disappeared into an added comment that states a
minimum initial size.
The underlying problem is that ArrayUtils.getNextSize() does not have an
argument for a minimum increase.
Would it make sense to add that, too? The code there has some strange constants
(3, 6 and 9) that could
perhaps be dropped when an extra argument for a minimum increase is added.
Looking at the comment there for the growth pattern, shouldn't the second
number (after 0) be 3 instead of 4?
> SortedVIntList allocation should use ArrayUtils.getNextSize()
> -------------------------------------------------------------
>
> Key: LUCENE-2217
> URL: https://issues.apache.org/jira/browse/LUCENE-2217
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Other
> Reporter: Paul Elschot
> Assignee: Michael McCandless
> Priority: Trivial
> Attachments: LUCENE-2217.patch
>
>
> See recent discussion on ArrayUtils.getNextSize().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]