lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toke Eskildsen (JIRA)" <>
Subject [jira] Updated: (LUCENE-1990) Add unsigned packed int impls in oal.util
Date Fri, 26 Feb 2010 15:51:28 GMT


Toke Eskildsen updated LUCENE-1990:

    Attachment: performance-te20100226.txt

I couldn't help making a tiny tweak to the performance test so that it outputs execution time
means for the different implementations. I have attached measurements from 5 different 64
bit machines. Looking at the means, I observe the following:

  * i7 Q820 and Xeon L5420: Practically no difference between aligned and packed with a small
edge to aligned
  * Core 2 and Xeon 5148: Aligned is consistently about 10% slower than packed
  * Xeon MP (old with just 1 MB CPU cache): Aligned ranges from 0-10% slower than packed,
depending on bits/value

The direct implementations outperforms packed and aligned for all sane cases (using direct8
to hold only 1 bit/value is clearly a bad idea). No surprise there.

Caveat: The tests were run without any other significantly resource heavy processes disturbing
it. This means that there were no fighting for the CPU cache.

Major caveat: Tests are needed on other processors than 64 bit Intel.

I would be great if someone could figure out how to make an aligned getter without using division
as that is surely the thing that hampers aligned performance.

> Add unsigned packed int impls in oal.util
> -----------------------------------------
>                 Key: LUCENE-1990
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael McCandless
>            Priority: Minor
>         Attachments: LUCENE-1990-te20100122.patch, LUCENE-1990-te20100210.patch, LUCENE-1990-te20100212.patch,
LUCENE-1990-te20100223.patch, LUCENE-1990-te20100226.patch, LUCENE-1990-te20100226b.patch,
LUCENE-1990.patch,, performance-te20100226.txt
> There are various places in Lucene that could take advantage of an
> efficient packed unsigned int/long impl.  EG the terms dict index in
> the standard codec in LUCENE-1458 could subsantially reduce it's RAM
> usage.  FieldCache.StringIndex could as well.  And I think "load into
> RAM" codecs like the one in TestExternalCodecs could use this too.
> I'm picturing something very basic like:
> {code}
> interface PackedUnsignedLongs  {
>   long get(long index);
>   void set(long index, long value);
> }
> {code}
> Plus maybe an iterator for getting and maybe also for setting.  If it
> helps, most of the usages of this inside Lucene will be "write once"
> so eg the set could make that an assumption/requirement.
> And a factory somewhere:
> {code}
>   PackedUnsignedLongs create(int count, long maxValue);
> {code}
> I think we should simply autogen the code (we can start from the
> autogen code in LUCENE-1410), or, if there is an good existing impl
> that has a compatible license that'd be great.
> I don't have time near-term to do this... so if anyone has the itch,
> please jump!

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:
For additional commands, e-mail:

View raw message