[
https://issues.apache.org/jira/browse/LUCENE-7691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862529#comment-15862529
]
Dawid Weiss commented on LUCENE-7691:
-------------------------------------
I'd say this matters only for really super-hot codepaths (and only when the
list in question does subsequent few expansions)? So I'd focus just on those 5%
of crucial invocations, not all of them (when, ironically, computing the size
of the target list may be eventually more costly than cheap tlab reallocations).
> ArrayLists should be created with explicit size if known
> --------------------------------------------------------
>
> Key: LUCENE-7691
> URL: https://issues.apache.org/jira/browse/LUCENE-7691
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael Braun
> Priority: Trivial
>
> Many places in Lucene there are ArrayLists being created with no explicit
> size set even when the exact size is known in advance. In these places, the
> size should be passed in so the underlying array is sized correctly the first
> time.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]