avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-939) Java: optimize BinaryData#compareBytes() to use sun.misc.Unsafe when available
Date Mon, 23 Jul 2012 17:14:35 GMT

    [ https://issues.apache.org/jira/browse/AVRO-939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420794#comment-13420794

Scott Carey commented on AVRO-939:

That is what it looks like -- a modest gain for larger sizes and a loss for smaller sizes.
 I have not had time to look into more details.  I suspect there are some ways to improve
the 10 byte time.  It would be useful to see a few other data points around that -- 5 bytes,
25 bytes, 50 bytes.    The slowdown for smaller sizes is an issue, and the modest improvement
for larger ones is a surprise.  There may be something getting in the way of better improvements
there as well -- or the JVM is doing a better job than expected optimizing this.
> Java: optimize BinaryData#compareBytes() to use sun.misc.Unsafe when available
> ------------------------------------------------------------------------------
>                 Key: AVRO-939
>                 URL: https://issues.apache.org/jira/browse/AVRO-939
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>    Affects Versions: 1.7.1
>            Reporter: Doug Cutting
>         Attachments: AVRO-939-1.patch, AVRO-939-2.patch, AVRO-939-3.patch, AVRO-939-4.patch,
> 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().

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message