You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Robert Muir <rc...@gmail.com> on 2013/07/16 20:14:04 UTC

Re: svn commit: r1503808 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicAppendingLongBuffer.java

Nice catch. Now there is very low constant overhead to these things, thank
you!!!

On Tue, Jul 16, 2013 at 10:50 AM, <jp...@apache.org> wrote:

> Author: jpountz
> Date: Tue Jul 16 17:50:00 2013
> New Revision: 1503808
>
> URL: http://svn.apache.org/r1503808
> Log:
> Fix initial sizing of MonotonicAppendingLongBuffer.
>
> Modified:
>
> lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicAppendingLongBuffer.java
>
> Modified:
> lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicAppendingLongBuffer.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicAppendingLongBuffer.java?rev=1503808&r1=1503807&r2=1503808&view=diff
>
> ==============================================================================
> ---
> lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicAppendingLongBuffer.java
> (original)
> +++
> lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicAppendingLongBuffer.java
> Tue Jul 16 17:50:00 2013
> @@ -43,7 +43,7 @@ public final class MonotonicAppendingLon
>     *  @param pageSize         the size of a single page */
>    public MonotonicAppendingLongBuffer(int initialPageCount, int pageSize)
> {
>      super(initialPageCount, pageSize);
> -    averages = new float[pageSize];
> +    averages = new float[initialPageCount];
>    }
>
>    /** Create an {@link MonotonicAppendingLongBuffer} with
> initialPageCount=16
>
>
>