Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-4157

Possible performance improvement in Bytes.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 0.90.4
    • None
    • Performance
    • None
    • all

    Description

      This is in line with the work already done on HBASE-4012.

      It's possible to improve all functions like Bytes.toShort, Bytes.toInt... and Bytes.putShort, putInt... by calling sun.misc.Unsafe functions. However, when using these functions the endianess must be taken into account. Infortunatly, HBase uses big endian while x86 systems are little endian. Hence a conversion is required. This convertion (Integer.reverseBytes) is optimized on jdk1.7 and 1.6.u23 version (see jdk 6946040 & 2198024). So with 1.6.u23+, this improvement could bring something around 5-10% on the whole system. Moreover, as for HBASE-4012, a compatibility feature for non little endian cpus or jdk without sun.misc.unsafe will have to be kept.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nkeywal Nicolas Liochon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: