[ 
https://issues.apache.org/jira/browse/LUCENE-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670449#action_12670449
 ] 

Michael McCandless commented on LUCENE-1536:
--------------------------------------------

Test results:

||%tg Filter||Query||Method||Hits||QPS||QPSNew||%tg change||
|0%|1|low|      0|18992.3| 142.6|-99.2%|
|0%|1|high|      0|18992.3| 109.6|-99.4%|
|1%|1|low|   3863| 133.7| 135.3|  1.2%|
|1%|1|high|   3863| 133.7|  99.7|-25.4%|
|2%|1|low|   7714| 108.2| 133.7| 23.6%|
|2%|1|high|   7714| 108.2| 100.5| -7.1%|
|5%|1|low|  19333|  76.9| 128.6| 67.2%|
|5%|1|high|  19333|  76.9|  97.2| 26.4%|
|10%|1|low|  38673|  62.5| 119.1| 90.6%|
|10%|1|high|  38673|  62.5|  92.0| 47.2%|
|25%|1|low|  96670|  47.3| 102.3|116.3%|
|25%|1|high|  96670|  47.3|  90.5| 91.3%|
|50%|1|low| 193098|  40.0|  85.6|114.0%|
|50%|1|high| 193098|  40.0|  79.6| 99.0%|
|75%|1|low| 289765|  38.0|  82.8|117.9%|
|75%|1|high| 289765|  38.0|  79.0|107.9%|
|90%|1|low| 347762|  37.2|  82.7|122.3%|
|90%|1|high| 347762|  37.2|  72.8| 95.7%|
|95%|1|low| 367102|  36.5|  82.9|127.1%|
|95%|1|high| 367102|  36.5|  73.1|100.3%|
|98%|1|low| 378721|  37.3|  81.8|119.3%|
|98%|1|high| 378721|  37.3|  73.0| 95.7%|
|99%|1|low| 382572|  36.6|  83.3|127.6%|
|99%|1|high| 382572|  36.6|  71.8| 96.2%|
|99.99999%|1|low| 386435|  38.0|  83.8|120.5%|
|99.99999%|1|high| 386435|  38.0|  70.9| 86.6%|
|100%|1|low| 386435|  88.0|  89.1|  1.2%|
|100%|1|high| 386435|  88.0|  89.5|  1.7%|
|0%|1-2|low|      0|18808.1|  71.5|-99.6%|
|0%|1-2|high|      0|18808.1|  22.4|-99.9%|
|1%|1-2|low|   5363|  46.8|  65.2| 39.3%|
|1%|1-2|high|   5363|  46.8|  22.5|-51.9%|
|2%|1-2|low|  10675|  37.6|  61.4| 63.3%|
|2%|1-2|high|  10675|  37.6|  22.4|-40.4%|
|5%|1-2|low|  26880|  28.8|  53.4| 85.4%|
|5%|1-2|high|  26880|  28.8|  22.3|-22.6%|
|10%|1-2|low|  53673|  23.7|  48.1|103.0%|
|10%|1-2|high|  53673|  23.7|  21.8| -8.0%|
|25%|1-2|low| 133988|  19.9|  37.2| 86.9%|
|25%|1-2|high| 133988|  19.9|  21.0|  5.5%|
|50%|1-2|low| 267757|  17.2|  27.4| 59.3%|
|50%|1-2|high| 267757|  17.2|  20.3| 18.0%|
|75%|1-2|low| 401596|  16.9|  23.1| 36.7%|
|75%|1-2|high| 401596|  16.9|  20.3| 20.1%|
|90%|1-2|low| 481911|  17.0|  21.2| 24.7%|
|90%|1-2|high| 481911|  17.0|  20.6| 21.2%|
|95%|1-2|low| 508704|  17.1|  20.7| 21.1%|
|95%|1-2|high| 508704|  17.1|  20.7| 21.1%|
|98%|1-2|low| 524909|  17.3|  20.7| 19.7%|
|98%|1-2|high| 524909|  17.3|  20.7| 19.7%|
|99%|1-2|low| 530221|  17.4|  20.5| 17.8%|
|99%|1-2|high| 530221|  17.4|  20.8| 19.5%|
|99.99999%|1-2|low| 535584|  17.1|  20.3| 18.7%|
|99.99999%|1-2|high| 535584|  17.1|  20.3| 18.7%|
|100%|1-2|low| 535584|  21.0|  20.7| -1.4%|
|100%|1-2|high| 535584|  21.0|  20.8| -1.0%|
|0%|1-4|low|      0|17961.7|  42.2|-99.8%|
|0%|1-4|high|      0|17961.7|  11.9|-99.9%|
|1%|1-4|low|   6544|  27.1|  38.4| 41.7%|
|1%|1-4|high|   6544|  27.1|  12.0|-55.7%|
|2%|1-4|low|  13062|  21.4|  36.0| 68.2%|
|2%|1-4|high|  13062|  21.4|  11.9|-44.4%|
|5%|1-4|low|  32815|  16.1|  31.3| 94.4%|
|5%|1-4|high|  32815|  16.1|  11.8|-26.7%|
|10%|1-4|low|  65491|  13.3|  27.8|109.0%|
|10%|1-4|high|  65491|  13.3|  11.7|-12.0%|
|25%|1-4|low| 163600|  10.5|  21.0|100.0%|
|25%|1-4|high| 163600|  10.5|  11.5|  9.5%|
|50%|1-4|low| 327302|   9.9|  15.3| 54.5%|
|50%|1-4|high| 327302|   9.9|  11.2| 13.1%|
|75%|1-4|low| 490881|   9.7|  12.6| 29.9%|
|75%|1-4|high| 490881|   9.7|  11.1| 14.4%|
|90%|1-4|low| 588990|   9.6|  11.6| 20.8%|
|90%|1-4|high| 588990|   9.6|  11.1| 15.6%|
|95%|1-4|low| 621666|   9.6|  11.3| 17.7%|
|95%|1-4|high| 621666|   9.6|  11.2| 16.7%|
|98%|1-4|low| 641419|   9.4|  11.1| 18.1%|
|98%|1-4|high| 641419|   9.4|  11.2| 19.1%|
|99%|1-4|low| 647937|   9.8|  11.1| 13.3%|
|99%|1-4|high| 647937|   9.8|  11.2| 14.3%|
|99.99999%|1-4|low| 654481|  10.0|  11.1| 11.0%|
|99.99999%|1-4|high| 654481|  10.0|  11.2| 12.0%|
|100%|1-4|low| 654481|  11.3|  11.3|  0.0%|
|100%|1-4|high| 654481|  11.3|  11.2| -0.9%|
|0%|1-10|low|      0|15990.0|  22.5|-99.9%|
|0%|1-10|high|      0|15990.0|   5.8|-100.0%|
|1%|1-10|low|   8406|  13.1|  20.2| 54.2%|
|1%|1-10|high|   8406|  13.1|   5.8|-55.7%|
|2%|1-10|low|  16756|  10.2|  18.9| 85.3%|
|2%|1-10|high|  16756|  10.2|   5.8|-43.1%|
|5%|1-10|low|  41937|   7.7|  16.5|114.3%|
|5%|1-10|high|  41937|   7.7|   5.7|-26.0%|
|10%|1-10|low|  83828|   6.3|  14.5|130.2%|
|10%|1-10|high|  83828|   6.3|   5.7| -9.5%|
|25%|1-10|low| 209328|   5.3|  10.9|105.7%|
|25%|1-10|high| 209328|   5.3|   5.7|  7.5%|
|50%|1-10|low| 418668|   4.9|   7.8| 59.2%|
|50%|1-10|high| 418668|   4.9|   5.5| 12.2%|
|75%|1-10|low| 628338|   4.9|   6.4| 30.6%|
|75%|1-10|high| 628338|   4.9|   5.5| 12.2%|
|90%|1-10|low| 753838|   4.9|   5.9| 20.4%|
|90%|1-10|high| 753838|   4.9|   5.5| 12.2%|
|95%|1-10|low| 795729|   5.0|   5.7| 14.0%|
|95%|1-10|high| 795729|   5.0|   5.6| 12.0%|
|98%|1-10|low| 820910|   5.1|   5.6|  9.8%|
|98%|1-10|high| 820910|   5.1|   5.6|  9.8%|
|99%|1-10|low| 829260|   5.1|   5.6|  9.8%|
|99%|1-10|high| 829260|   5.1|   5.6|  9.8%|
|99.99999%|1-10|low| 837666|   5.2|   5.6|  7.7%|
|99.99999%|1-10|high| 837666|   5.2|   5.6|  7.7%|
|100%|1-10|low| 837666|   5.7|   5.7|  0.0%|
|100%|1-10|high| 837666|   5.7|   5.6| -1.8%|
|0%|+1-2|low|      0|18848.4| 138.4|-99.3%|
|0%|+1-2|high|      0|18848.4|  27.4|-99.9%|
|1%|+1-2|low|   2308|  63.1|  77.0| 22.0%|
|1%|+1-2|high|   2308|  63.1|  27.1|-57.1%|
|2%|+1-2|low|   4621|  50.3|  69.7| 38.6%|
|2%|+1-2|high|   4621|  50.3|  26.8|-46.7%|
|5%|+1-2|low|  11706|  36.1|  56.9| 57.6%|
|5%|+1-2|high|  11706|  36.1|  26.5|-26.6%|
|10%|+1-2|low|  23272|  28.4|  48.6| 71.1%|
|10%|+1-2|high|  23272|  28.4|  26.2| -7.7%|
|25%|+1-2|low|  58401|  23.7|  36.4| 53.6%|
|25%|+1-2|high|  58401|  23.7|  24.9|  5.1%|
|50%|+1-2|low| 117083|  20.9|  28.2| 34.9%|
|50%|+1-2|high| 117083|  20.9|  23.9| 14.4%|
|75%|+1-2|low| 176233|  19.3|  24.4| 26.4%|
|75%|+1-2|high| 176233|  19.3|  22.8| 18.1%|
|90%|+1-2|low| 211362|  18.6|  22.9| 23.1%|
|90%|+1-2|high| 211362|  18.6|  22.5| 21.0%|
|95%|+1-2|low| 222928|  18.5|  22.5| 21.6%|
|95%|+1-2|high| 222928|  18.5|  22.5| 21.6%|
|98%|+1-2|low| 230013|  18.3|  22.0| 20.2%|
|98%|+1-2|high| 230013|  18.3|  22.4| 22.4%|
|99%|+1-2|low| 232326|  18.3|  22.1| 20.8%|
|99%|+1-2|high| 232326|  18.3|  22.3| 21.9%|
|99.99999%|+1-2|low| 234634|  17.8|  21.9| 23.0%|
|99.99999%|+1-2|high| 234634|  17.8|  22.2| 24.7%|
|100%|+1-2|low| 234634|  22.9|  22.7| -0.9%|
|100%|+1-2|high| 234634|  22.9|  22.6| -1.3%|
|0%|+1-4|low|      0|17987.0| 137.9|-99.2%|
|0%|+1-4|high|      0|17987.0|  18.0|-99.9%|
|1%|+1-4|low|    923|  34.5|  58.4| 69.3%|
|1%|+1-4|high|    923|  34.5|  17.9|-48.1%|
|2%|+1-4|low|   1849|  28.7|  51.9| 80.8%|
|2%|+1-4|high|   1849|  28.7|  17.9|-37.6%|
|5%|+1-4|low|   4794|  22.1|  39.0| 76.5%|
|5%|+1-4|high|   4794|  22.1|  17.8|-19.5%|
|10%|+1-4|low|   9595|  19.9|  35.3| 77.4%|
|10%|+1-4|high|   9595|  19.9|  17.5|-12.1%|
|25%|+1-4|low|  24136|  17.3|  25.7| 48.6%|
|25%|+1-4|high|  24136|  17.3|  17.2| -0.6%|
|50%|+1-4|low|  48328|  16.1|  19.5| 21.1%|
|50%|+1-4|high|  48328|  16.1|  16.8|  4.3%|
|75%|+1-4|low|  72718|  15.8|  17.0|  7.6%|
|75%|+1-4|high|  72718|  15.8|  16.6|  5.1%|
|90%|+1-4|low|  87259|  15.3|  16.3|  6.5%|
|90%|+1-4|high|  87259|  15.3|  16.4|  7.2%|
|95%|+1-4|low|  92060|  15.4|  16.0|  3.9%|
|95%|+1-4|high|  92060|  15.4|  16.4|  6.5%|
|98%|+1-4|low|  95005|  15.4|  15.8|  2.6%|
|98%|+1-4|high|  95005|  15.4|  16.4|  6.5%|
|99%|+1-4|low|  95931|  15.1|  15.7|  4.0%|
|99%|+1-4|high|  95931|  15.1|  16.4|  8.6%|
|99.99999%|+1-4|low|  96854|  14.3|  15.9| 11.2%|
|99.99999%|+1-4|high|  96854|  14.3|  16.2| 13.3%|
|100%|+1-4|low|  96854|  16.6|  16.6|  0.0%|
|100%|+1-4|high|  96854|  16.6|  16.6|  0.0%|
|0%|"u s"|low|      0|19123.0| 124.9|-99.3%|
|0%|"u s"|high|      0|19123.0|   7.0|-100.0%|
|1%|"u s"|low|   3192|  23.5|  27.3| 16.2%|
|1%|"u s"|high|   3192|  23.5|   7.1|-69.8%|
|2%|"u s"|low|   6179|  17.8|  24.3| 36.5%|
|2%|"u s"|high|   6179|  17.8|   7.0|-60.7%|
|5%|"u s"|low|  15446|  12.7|  20.3| 59.8%|
|5%|"u s"|high|  15446|  12.7|   7.0|-44.9%|
|10%|"u s"|low|  30858|  10.1|  16.1| 59.4%|
|10%|"u s"|high|  30858|  10.1|   6.8|-32.7%|
|25%|"u s"|low|  77138|   7.7|  13.0| 68.8%|
|25%|"u s"|high|  77138|   7.7|   6.8|-11.7%|
|50%|"u s"|low| 154331|   6.7|   9.9| 47.8%|
|50%|"u s"|high| 154331|   6.7|   7.0|  4.5%|
|75%|"u s"|low| 231412|   6.3|   8.4| 33.3%|
|75%|"u s"|high| 231412|   6.3|   7.0| 11.1%|
|90%|"u s"|low| 277692|   5.8|   7.2| 24.1%|
|90%|"u s"|high| 277692|   5.8|   7.0| 20.7%|
|95%|"u s"|low| 293104|   5.8|   7.1| 22.4%|
|95%|"u s"|high| 293104|   5.8|   7.0| 20.7%|
|98%|"u s"|low| 302371|   5.8|   7.0| 20.7%|
|98%|"u s"|high| 302371|   5.8|   6.9| 19.0%|
|99%|"u s"|low| 305358|   5.8|   6.9| 19.0%|
|99%|"u s"|high| 305358|   5.8|   6.9| 19.0%|
|99.99999%|"u s"|low| 308550|   5.8|   6.8| 17.2%|
|99.99999%|"u s"|high| 308550|   5.8|   6.9| 19.0%|
|100%|"u s"|low| 308550|   7.0|   6.9| -1.4%|
|100%|"u s"|high| 308550|   7.0|   6.9| -1.4%|


> if a filter can support random access API, we should use it
> -----------------------------------------------------------
>
>                 Key: LUCENE-1536
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1536
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.4
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>
> I ran some performance tests, comparing applying a filter via
> random-access API instead of current trunk's iterator API.
> This was inspired by LUCENE-1476, where we realized deletions should
> really be implemented just like a filter, but then in testing found
> that switching deletions to iterator was a very sizable performance
> hit.
> Some notes on the test:
>   * Index is first 2M docs of Wikipedia.  Test machine is Mac OS X
>     10.5.6, quad core Intel CPU, 6 GB RAM, java 1.6.0_07-b06-153.
>   * I test across multiple queries.  1-X means an OR query, eg 1-4
>     means 1 OR 2 OR 3 OR 4, whereas +1-4 is an AND query, ie 1 AND 2
>     AND 3 AND 4.  "u s" means "united states" (phrase search).
>   * I test with multiple filter densities (0, 1, 2, 5, 10, 25, 75, 90,
>     95, 98, 99, 99.99999 (filter is non-null but all bits are set),
>     100 (filter=null, control)).
>   * Method high means I use random-access filter API in
>     IndexSearcher's main loop.  Method low means I use random-access
>     filter API down in SegmentTermDocs (just like deleted docs
>     today).
>   * Baseline (QPS) is current trunk, where filter is applied as iterator up
>     "high" (ie in IndexSearcher's search loop).

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to