[
https://issues.apache.org/jira/browse/HBASE-4012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052698#comment-13052698
]
stack commented on HBASE-4012:
------------------------------
I like this kinda comment:
{code}
* Compare 8 bytes at a time. Benchmarking shows comparing 8 bytes at a
* time is no slower than comparing 4 bytes at a time even on 32-bit.
* On the other hand, it is substantially faster on 64-bit.
{code}
> Further optimize byte comparison methods
> ----------------------------------------
>
> Key: HBASE-4012
> URL: https://issues.apache.org/jira/browse/HBASE-4012
> Project: HBase
> Issue Type: Improvement
> Components: util
> Affects Versions: 0.92.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Minor
> Fix For: 0.92.0
>
>
> Guava uses some clever tricks with sun.misc.Unsafe to compare byte arrays
> about 100% faster than the naive byte-by-byte implementation:
> http://guava-libraries.googlecode.com/svn/trunk/guava/src/com/google/common/primitives/UnsignedBytes.java
> We should borrow this [Apache 2 licensed] code.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira