You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2014/10/20 22:39:34 UTC

[jira] [Updated] (LUCENE-6015) Revisit DocIdSetBuilder's heuristic to switch to FixedBitSet

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

Adrien Grand updated LUCENE-6015:
---------------------------------
    Attachment: LUCENE-6015.patch

Here is a patch proposal that updates the shift value from 14 to 10. This seems to work fine with the luceneutil benchmarks (see above) and with http://people.apache.org/~jpountz/sparse.html which reports that the sparse impl is both faster to build and to iterate when the set contains less than maxDoc/1000 documents (1000 ~ 2^10).

A shift value of 10 practically means that FixedBitSet will be preferred to SparseFixedBitSet when more than 1/16 of the long values contain at least one bit that is set.

> Revisit DocIdSetBuilder's heuristic to switch to FixedBitSet
> ------------------------------------------------------------
>
>                 Key: LUCENE-6015
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6015
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6015.patch
>
>
> DocIdSetBuilder starts with a SparseFixedBitSet and then upgrades to a FixedBitSet when the cardinality grows larger than maxDoc >>> 14. However Robert improved SparseFixedBitSet performance quite significantly in LUCENE-6003 so we should see if it makes sense to update this heuristic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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