lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r1376305 [1/37] - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/
Date Thu, 23 Aug 2012 11:12:48 GMT
Hi Mike,

I fixed this for the first part. The second list has holes, so must stay as switch.

One thing:
- The svn:eol property was missing, so all files were invalid on windows (eclipse complained
about line ending). I fixed the property. You should reconfigure your SVN client to add correct
eol-style
- The gen_Bulk Python script (and maybe others) have a bug (seems to be related to 32 bit
architecture of my cygwin!): The hexadecimal numbers are generated with LL instead one single
L at end! I have no idea, what the bug is, but this is serious, if you want to regenerate.
- The python script should use correct line ending, too - it always uses \n, also on windows.

Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Thursday, August 23, 2012 10:37 AM
> To: dev@lucene.apache.org
> Subject: RE: svn commit: r1376305 [1/37] -
> /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/
> 
> Hi Mike,
> 
> a small suggestion tot he main BulkOperation.java file, this method: "public
> static BulkOperation of(PackedInts.Format format, int bitsPerValue)"
> I would not use the 2 huge switch statements, instead use 2 arrays (for the 2
> main types), initialize this array like:
> 
> BulkOperation [] packedBulkOps = new BulkOperation[] {
> 	new BulkOperationPacked1(), new BulkOperationPacked2(),new
> BulkOperationPacked3(),...
> }
> BulkOperation [] packedSingleBulkOps = new BulkOperation[] {
> 	new BulkOperationPackedSingleBlock1(), new
> BulkOperationPackedSingleBlock2(),new BulkOperationPackedSingleBlock3(),...
> }
> 
> And then do BulkOperation.of() as:
>   public static BulkOperation of(PackedInts.Format format, int bitsPerValue) {
>     switch (format) {
>     case PACKED:
>       return packedBulkOps[bitsPerValue-1];
>     case PACKED_SINGLE_BLOCK:
>       return packedSingleBulkOps[bitsPerValue-1];
>     default:
>       throw new AssertionError();
>     }
>   }
> 
> Much more compact and faster, because the first switch statement is too big
> for a tableSwich (if speed is important).
> 
> I would change this, but I have no idea about python - but let me try :-)
> 
> Uwe
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
> 
> > -----Original Message-----
> > From: mikemccand@apache.org [mailto:mikemccand@apache.org]
> > Sent: Thursday, August 23, 2012 1:14 AM
> > To: commits@lucene.apache.org
> > Subject: svn commit: r1376305 [1/37] -
> > /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/
> >
> > Author: mikemccand
> > Date: Wed Aug 22 23:13:40 2012
> > New Revision: 1376305
> >
> > URL: http://svn.apache.org/viewvc?rev=1376305&view=rev
> > Log:
> > refactor BulkOperation.java into separate sources
> >
> > Added:
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked1.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked10.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked11.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked12.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked13.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked14.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked15.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked16.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked17.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked18.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked19.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked2.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked20.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked21.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked22.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked23.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked24.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked25.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked26.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked27.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked28.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked29.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked3.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked30.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked31.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked32.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked33.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked34.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked35.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked36.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked37.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked38.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked39.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked4.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked40.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked41.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked42.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked43.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked44.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked45.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked46.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked47.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked48.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked49.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked5.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked50.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked51.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked52.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked53.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked54.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked55.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked56.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked57.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked58.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked59.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked6.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked60.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked61.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked62.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked63.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked64.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked7.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked8.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPacked9.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock1.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock10.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock12.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock16.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock2.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock21.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock3.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock32.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock4.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock5.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock6.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock7.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock8.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > erationPackedSingleBlock9.java
> > Modified:
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/Bu
> > lkOp
> > eration.java
> >
> > lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/ge
> > n_Bu
> > lkOperation.py
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message