You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Feng Guo (Jira)" <ji...@apache.org> on 2020/11/30 12:20:00 UTC

[jira] [Updated] (LUCENE-9624) fix duplicate compute on maxUnpatchedValue

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

Feng Guo updated LUCENE-9624:
-----------------------------
    Description: 
in [LUCENE-9027|[https://github.com/apache/lucene-solr/pull/973]] lucene introduced SIMD to decode postings, which leaves a very small problem. i hope i can fix this as my first PR on this amazing project :).

detail:
{code:java}
maxUnpatchedValue has already computed apache.lucene.codecs.lucene84.PForUtil#encode line 64
final long maxUnpatchedValue = (1L << patchedBitsRequired) - 1;

apache.lucene.codecs.lucene84.PForUtil#encode line 74
but computed later again:
if (longs[i] > (1L << patchedBitsRequired) - 1)...{code}

  was:
in [LUCENE-9027|[https://github.com/apache/lucene-solr/pull/973]] lucene introduced SIMD to decode postings, which leaves a very small problem. i hope i can fix this as my first PR on this amazing project :).

detail:

maxUnpatchedValue has already computed:
{code:java}
apache.lucene.codecs.lucene84.PForUtil#encode line 64
final long maxUnpatchedValue = (1L << patchedBitsRequired) - 1;{code}


> fix duplicate compute on maxUnpatchedValue
> ------------------------------------------
>
>                 Key: LUCENE-9624
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9624
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/codecs
>            Reporter: Feng Guo
>            Priority: Major
>
> in [LUCENE-9027|[https://github.com/apache/lucene-solr/pull/973]] lucene introduced SIMD to decode postings, which leaves a very small problem. i hope i can fix this as my first PR on this amazing project :).
> detail:
> {code:java}
> maxUnpatchedValue has already computed apache.lucene.codecs.lucene84.PForUtil#encode line 64
> final long maxUnpatchedValue = (1L << patchedBitsRequired) - 1;
> apache.lucene.codecs.lucene84.PForUtil#encode line 74
> but computed later again:
> if (longs[i] > (1L << patchedBitsRequired) - 1)...{code}



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

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