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

Feng Guo edited comment on LUCENE-9629 at 12/3/20, 3:51 AM:
------------------------------------------------------------

[~mdrob] Thanks for you reply! That's a really good idea, I updated my 
[PR|[https://github.com/apache/lucene-solr/pull/2113/files]] and find the lines 
of code get even less~


was (Author: gf2121):
[~mdrob] Thanks for you reply! That's a really good idea, I updated my [pull 
request|[https://github.com/apache/lucene-solr/pull/2113/files]] and find the 
lines of code get even less~

> Use computed mask values in ForUtil
> -----------------------------------
>
>                 Key: LUCENE-9629
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9629
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/codecs
>            Reporter: Feng Guo
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the class ForkUtil, mask values have been computed and stored in static 
> final vailables, but they are recomputed for every encoding, which may be 
> unnecessary. 
> anther small fix is that change
> {code:java}
> remainingBitsPerValue > remainingBitsPerLong{code}
>  to
> {code:java}
> remainingBitsPerValue >= remainingBitsPerLong{code}
> otherwise
>  
> {code:java}
> if (remainingBitsPerValue == 0) {
>  idx++;
>  remainingBitsPerValue = bitsPerValue; 
> }
> {code}
>  
> these code will never be used.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to