You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucy.apache.org by "Marvin Humphrey (JIRA)" <ji...@apache.org> on 2010/01/30 02:37:34 UTC

[jira] Updated: (LUCY-97) Consolidate algorithms for incremental array growth

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

Marvin Humphrey updated LUCY-97:
--------------------------------

    Attachment: oversize.diff

The algorithm provided by this patch was hammered out on the java-dev mailing
list in the January 12 thread "Dynamic array reallocation algorithms"
(http://markmail.org/thread/x427sku4wrnc3rjf) and in LUCENE-2213.

> Consolidate algorithms for incremental array growth
> ---------------------------------------------------
>
>                 Key: LUCY-97
>                 URL: https://issues.apache.org/jira/browse/LUCY-97
>             Project: Lucy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>         Attachments: oversize.diff
>
>
> The problem of incremental array growth affects several of our classes:
> CharBuf, ByteBuf, BitVector, VArray, and others yet to be submitted.  Ideally,
> the growth algorithm should...
>   * Overestimate by enough to prevent pathological reallocation, but not by
>     so much as to significantly increase overall memory footprint.
>   * Round up so that allocation requests are multiples of the architecture's
>     word size.
>   * Grow faster at small sizes.
> To apply this logic consistently, we can isolate it in a new function, 
> Memory_oversize().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.