[
https://issues.apache.org/jira/browse/HADOOP-7761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136500#comment-13136500
]
Todd Lipcon commented on HADOOP-7761:
-------------------------------------
bq. let's put a javadoc pointer to com.google.common.primtives.UnsignedBytes in
the javadoc.
Fixed
bq. Why use lessThanUnsigned instead of UnsignedLongs#compare and why does the
epilogue here differ from upstream guava
the UnsignedLongs class is new in Guava r10, but our dependency is on r09, so
that's the source code I borrowed from. The epilogue is slightly different but
not for any good reason. I'll revert it to be more similar to upstream (the
exact upstream version doesn't work since again we need to add the array
offsets.)
New patch coming in a minute.
> Improve performance of raw comparisons
> --------------------------------------
>
> Key: HADOOP-7761
> URL: https://issues.apache.org/jira/browse/HADOOP-7761
> Project: Hadoop Common
> Issue Type: Improvement
> Components: io, performance, util
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Attachments: hadoop-7761.txt, hadoop-7761.txt
>
>
> Guava has a nice implementation of lexicographical byte-array comparison that
> uses sun.misc.Unsafe to compare unsigned byte arrays long-at-a-time. Their
> benchmarks show it as being 2x more CPU-efficient than the equivalent
> pure-Java implementation. We can easily integrate this into
> WritableComparator.compareBytes to improve CPU performance in the shuffle.
--
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