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

Simon Willnauer updated LUCENE-2662:
------------------------------------

    Attachment: LUCENE-2662.patch

This patch contains a slightly different version of BytesHash (renamed it to 
BytesRefHash but that is to be discussed - while writing this I actually think 
BytesHash is the better name).  BytesRefHash is now final and does not create 
Entry objects anymore. Internally it maintains two integer arrays one acting as 
the hash buckets and the other one contain the bytes-start offset in the 
ByteBlockPool. Each added entry is assigned to an increasing ordinal since this 
is what Entry is used in almost all use-cases (in CSF though). For 
TermsHashPerField this is also "native" since is uses the same kind of 
referencing system.

These changes keep this class as efficient as possible, keeping GC costs low 
and allows JIT to do better optimizations. IMO this class is super performance 
critical and since we recently refactored indexing towards parallel arrays 
adding another "object" array might not be the way to go anyway.

I also incorporated robers comments - thanks for the review anyway. I guess 
that is the first step towards factoring it out of TermsHashPerField, the next 
question is are we gonna do that in a different issue and get this committed 
first?

comments / review welcome!!

One more thing, I did not move ByteBlockPool to o.a.l.utils but I thing it 
belongs there, thoughts?

> BytesHash
> ---------
>
>                 Key: LUCENE-2662
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2662
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: Realtime Branch, 4.0
>            Reporter: Jason Rutherglen
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: Realtime Branch, 4.0
>
>         Attachments: LUCENE-2662.patch, LUCENE-2662.patch
>
>
> This issue will have the BytesHash separated out from LUCENE-2186

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

Reply via email to