Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-939

Java: optimize BinaryData#compareBytes() to use sun.misc.Unsafe when available

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 1.7.1
    • None
    • java
    • None

    Description

      Google's Guava libraries include an optimized implementation of lexicographic byte comparison based on sun.misc.Unsafe that's ~4x faster than the normal Java implementation.

      http://hiroshiyamauchi.blogspot.com/2010/08/fast-unsigned-byte-lexicographical.html
      http://www.google.com/codesearch#UKMs0lhE9bg/trunk/src/com/google/common/primitives/UnsignedBytes.java&l=276

      We might similarly optimize BinaryData#compareBytes().

      Attachments

        1. AVRO-939.patch
          16 kB
          Doug Cutting
        2. AVRO-939-1.patch
          3 kB
          Eli Reisman
        3. AVRO-939-2.patch
          10 kB
          Eli Reisman
        4. AVRO-939-3.patch
          10 kB
          Eli Reisman
        5. AVRO-939-4.patch
          9 kB
          Eli Reisman

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cutting Doug Cutting
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: