You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2010/07/13 13:15:50 UTC

[jira] Commented: (LUCENE-2213) Small improvements to ArrayUtil.getNextSize

    [ https://issues.apache.org/jira/browse/LUCENE-2213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887715#action_12887715 ] 

Shai Erera commented on LUCENE-2213:
------------------------------------

This somehow found its way to 3x (I believe it was before the branch). And now we have a case where a code is compiled against 3.0.1 and does not run when 3.1 (dev version) is used. I don't this change on 3.0.2, so perhaps we should just rename it back on the 3x branch?

> Small improvements to ArrayUtil.getNextSize
> -------------------------------------------
>
>                 Key: LUCENE-2213
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2213
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2213-mergetest.patch, LUCENE-2213.patch, LUCENE-2213.patch, LUCENE-2213.patch, LUCENE-2213.patch
>
>
> Spinoff from java-dev thread "Dynamic array reallocation algorithms" started on Jan 12, 2010.
> Here's what I did:
>   * Keep the +3 for small sizes
>   * Added 2nd arg = number of bytes per element.
>   * Round up to 4 or 8 byte boundary (if it's 32 or 64 bit JRE respectively)
>   * Still grow by 1/8th
>   * If 0 is passed in, return 0 back
> I also had to remove some asserts in tests that were checking the actual values returned by this method -- I don't think we should test that (it's an impl. detail).

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org