[jira] [Updated] (LUCENE-4322) Can we make oal.util.packed.BulkOperation* smaller?

2012-08-31 Thread Adrien Grand (JIRA)

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

Adrien Grand updated LUCENE-4322:
-

Attachment: LUCENE-4322-2.patch

New iteration.

This patch makes the JAR 84kB smaller (now 2243513 bytes) by :
 1.removing the specializations for BulkOperationPackedSingleBlock,
 2. rolling back some loops,
 3. removing the assertions on the buffer sizes (that were rather useless).

I removed the specializations for BulkOperationPackedSingleBlock because the 
default version is already rather fast (it has no conditions). For example, for 
bitsPerValue=4, BulkOperationPackedSingleBlock is only ~20-30% slower than 
BulkOperationPacked4 and BulkOperationPackedSingleBlock4, while 
BulkOperationPacked is ~300% slower.

Moreover I rolled back some loops (especially the decode(byte[],...) are now 8 
times shorter).

I ran a benchmark between this patch and current trunk to make sure these 
changes don't hurt the Block postings format performance ('local' means patch 
applied):
{noformat}
Task   QPS trunkStdDev trunk   QPS localStdDev local  Pct 
diff
 LowSpanNear   28.220.81   27.111.64  -12% -
4%
 MedSpanNear8.860.308.630.47  -11% -
6%
HighSpanNear7.590.247.420.42  -10% -
6%
 MedTerm  965.02   26.52  947.64   22.67   -6% -
3%
HighTerm  265.849.09  262.465.01   -6% -
4%
  HighPhrase9.431.179.411.23  -22% -   
28%
PKLookup  249.61   10.58  250.468.97   -7% -
8%
  OrHighHigh   58.762.22   59.093.13   -8% -   
10%
   LowPhrase   76.162.73   76.823.24   -6% -
9%
   OrHighLow  140.835.06  142.337.41   -7% -   
10%
   MedPhrase   60.212.81   60.923.28   -8% -   
11%
   OrHighMed  136.164.81  138.127.21   -7% -   
10%
 LowSloppyPhrase   81.252.17   82.802.82   -4% -
8%
 Respell   91.724.07   93.472.21   -4% -
9%
 Prefix3  251.638.73  256.486.61   -4% -
8%
 AndHighHigh  136.172.20  138.952.85   -1% -
5%
HighSloppyPhrase   14.170.66   14.460.74   -7% -   
12%
Wildcard  185.865.38  190.233.38   -2% -
7%
  IntNRQ   63.106.93   64.652.58  -11% -   
19%
 MedSloppyPhrase   25.481.05   26.271.17   -5% -   
12%
  Fuzzy1  106.764.83  110.172.44   -3% -   
10%
  AndHighLow 2650.35   53.66 2739.95   58.800% -
7%
  Fuzzy2   35.451.95   36.750.99   -4% -   
12%
  AndHighMed  357.485.31  370.886.770% -
7%
 LowTerm 2211.45   89.59 2298.23  104.62   -4% -   
13%
{noformat}

This looks good to me.

I think there are maybe a few things we could still do to reduce the JAR size 
but I'm worried that there would be little gain compared to the increased 
complexity of these classes.

I just tried to remove all BulkOperation* specializations, and it only made the 
JAR 52kb smaller compared to this patch, so maybe we should stop here? There's 
already been a lot of progress!

 Can we make oal.util.packed.BulkOperation* smaller?
 ---

 Key: LUCENE-4322
 URL: https://issues.apache.org/jira/browse/LUCENE-4322
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Michael McCandless
 Fix For: 5.0, 4.0

 Attachments: LUCENE-4322-2.patch, LUCENE-4322.patch


 These source files add up to a lot of sources ... it caused problems when 
 compiling under Maven and InteliJ.
 I committed a change to make separates files, but in aggregate this is still 
 a lot ...
 EG maybe we don't need to specialize encode?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Updated] (LUCENE-4322) Can we make oal.util.packed.BulkOperation* smaller?

2012-08-28 Thread Adrien Grand (JIRA)

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

Adrien Grand updated LUCENE-4322:
-

Attachment: LUCENE-4322.patch

Patch that tries to reduce the JAR size:
 - unspecialized encode methods,
 - specialized decode methods only when 0  bitsPerValue = 24.

Overall, it makes the core jar 361kb bytes smaller (2700542 bytes before 
applying the patch, 2330514 after).

I ran a quick run of lucene-util in debug mode with blockPostingsFormat=For and 
it showed no performance difference.

 Can we make oal.util.packed.BulkOperation* smaller?
 ---

 Key: LUCENE-4322
 URL: https://issues.apache.org/jira/browse/LUCENE-4322
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Michael McCandless
 Fix For: 5.0, 4.0

 Attachments: LUCENE-4322.patch


 These source files add up to a lot of sources ... it caused problems when 
 compiling under Maven and InteliJ.
 I committed a change to make separates files, but in aggregate this is still 
 a lot ...
 EG maybe we don't need to specialize encode?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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