Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8248043

Need to eliminate excessive i2l conversions

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b05
    • CPU:
      generic

      Backports

        Description

        On the example below (it is a hot code) value is converted to int, then back to long, and then compared to -1L - in this sequence casting to long is excessive.

        https://github.com/apache/lucene-solr/blob/master/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java#L192

        int term = (int) segValues.nextOrd();
        while (term != -1L) {

        ; - org.apache.lucene.facet.sortedset.SortedSetDocValuesFacetCounts::countOneSegment@192 (line 204)
        0x0000ffff801cbb80: ldr x10, [x15, #16] ; loading value
        0x0000ffff801cbb84: mov w11, w10 ; l2i
        0x0000ffff801cbb88: sxtw x10, w11 ; i2l
        ..
        0x0000ffff801cbb90: cmn x10, #0x1 ; ifeq -1

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bulasevich Boris Ulasevich
                Reporter:
                bulasevich Boris Ulasevich
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: