hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-3928) Some potential performance improvements to Bytes/KeyValue
Date Fri, 27 May 2011 18:28:47 GMT

     [ https://issues.apache.org/jira/browse/HBASE-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Todd Lipcon updated HBASE-3928:

    Attachment: hbase-3928.txt

This patch hasn't been thoroughly tested or benchmarked yet but might be helpful. Someone
got a cluster handy for YCSB scan/get benchmark for in-memory active set size?

> Some potential performance improvements to Bytes/KeyValue
> ---------------------------------------------------------
>                 Key: HBASE-3928
>                 URL: https://issues.apache.org/jira/browse/HBASE-3928
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.92.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>             Fix For: 0.92.0
>         Attachments: hbase-3928.txt
> We use Bytes.compareTo() a lot where we could be using a more efficient equals() method.
The trick that makes equals() faster than compareTo is that we can short-circuit two common
> Case 1) the length is not the same - only need to do one comparison
> Case 2) the two arrays have the same length and a common prefix: compare the last byte
first, since it's the one most likely to differ (given we are usually comparing adjacent sorted

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message