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

Dawid Weiss commented on LUCENE-7994:
-------------------------------------

I don't mind if you just copy the code, Mike, but it's always a pleasant 
feeling to have the library used. :) Upgrade the version before you commit 
though -- there's a minor performance improvement in {{addTo}}, which I see is 
used.

https://github.com/carrotsearch/hppc/releases/tag/0.7.3

> Use int/int hash map for int taxonomy facet counts
> --------------------------------------------------
>
>                 Key: LUCENE-7994
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7994
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: master (8.0), 7.2
>
>         Attachments: LUCENE-7994.patch, LUCENE-7994.patch
>
>
> Int taxonomy facets today always count into a dense {{int[]}}, which is 
> wasteful in cases where the number of unique facet labels is high and the 
> size of the current result set is small.
> I factored the native hash map from LUCENE-7927 and use a simple heuristic 
> (customizable by the user by subclassing) to decide up front whether to count 
> sparse or dense.  I also made loading of the large children and siblings 
> {{int[]}} lazy, so that they are only instantiated if you really need them.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to