Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10329

Use Computed Mask For DirectMonotonicReader#get

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.1
    • core/codecs
    • None
    • New

    Description

      I saw DirectMonotonicReader#get was the hot method during when running luceneutil test, So using a computed mask for DirectMonotonicReader#get instead of computing it for every call may make a bit sense

      PERCENT       CPU SAMPLES   STACK
      14.07%        66936         org.apache.lucene.util.packed.DirectMonotonicReader#get()
      5.93%         28198         org.apache.lucene.codecs.lucene90.Lucene90DocValuesProducer$17#binaryValue()
      5.44%         25858         org.apache.lucene.util.packed.DirectReader$DirectPackedReader12#get()
      5.27%         25052         org.apache.lucene.facet.taxonomy.FastTaxonomyFacetCounts#countAll()
      4.48%         21310         java.nio.ByteBuffer#get()
      1.83%         8722          java.nio.Buffer#position()
      1.80%         8573          jdk.internal.misc.ScopedMemoryAccess#getByteInternal()
      1.80%         8558          org.apache.lucene.store.ByteBufferGuard#ensureValid()
      1.79%         8537          java.nio.Buffer#scope()
      1.67%         7939          org.apache.lucene.facet.sortedset.SortedSetDocValuesFacetCounts#countOneSegment()
      1.51%         7182          org.apache.lucene.facet.taxonomy.IntTaxonomyFacets#increment()
      1.43%         6781          java.nio.Buffer#nextGetIndex()
      1.40%         6657          java.nio.Buffer#checkIndex()
      1.26%         5979          org.apache.lucene.codecs.lucene90.Lucene90PostingsReader$EverythingEnum#advance()
      1.19%         5670          jdk.internal.misc.Unsafe#convEndian()
      1.17%         5565          java.nio.DirectByteBuffer#ix()
      1.12%         5310          org.apache.lucene.search.BooleanScorer$OrCollector#collect()
      1.07%         5075          org.apache.lucene.store.ByteBufferGuard#getShort()
      1.06%         5065          org.apache.lucene.search.ConjunctionDISI#doNext()
      1.03%         4914          jdk.internal.util.Preconditions#checkFromIndexSize()
      1.02%         4869          jdk.internal.misc.ScopedMemoryAccess#getShortUnalignedInternal()
      0.99%         4719          org.apache.lucene.store.ByteBufferIndexInput$SingleBufferImpl#seek()
      0.96%         4587          java.nio.DirectByteBuffer#get()
      0.96%         4587          org.apache.lucene.search.MultiCollector$MultiLeafCollector#collect()
      0.94%         4460          org.apache.lucene.codecs.lucene90.Lucene90PostingsReader$EverythingEnum#nextPosition()
      0.90%         4297          org.apache.lucene.facet.taxonomy.FastTaxonomyFacetCounts#count()
      0.84%         3996          org.apache.lucene.search.similarities.BM25Similarity$BM25Scorer#score()
      0.79%         3769          org.apache.lucene.search.BooleanScorer#scoreDocument()
      0.77%         3648          org.apache.lucene.codecs.lucene90.Lucene90PostingsReader$BlockDocsEnum#nextDoc()
      0.75%         3572          org.apache.lucene.codecs.lucene90.Lucene90NormsProducer$3#longValue()
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gf2121 Feng Guo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m