[ 
https://issues.apache.org/jira/browse/HBASE-17877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970291#comment-15970291
 ] 

Vikas Vishwakarma commented on HBASE-17877:
-------------------------------------------

thanks for suggesting JMH [~stack] , plan to use it extensively going forward 
very helpful microbenchmark tool
[~larsh] I have uploaded both versions 
1. v3 returns -1, 0, +1 range output, same as current HBase comparator
2. v4 returns -int, 0, +int range output same as guava/hadoop but will be 
different from current HBase comparator output 
I also did a quick benchmark of the two guava version v3, v4 and it does look 
like mapping the output in the -1, 0, +1 range has a considerable impact on the 
microbenchmark. Result table given below.
Please review and let me know what you think and based on that I can submit the 
changes for other branches and also the main branch BBUtil

|---|HBase|---|---|guava|---|---|%diff|---|---|guava101|---|---|%diff|---|---|
|byte array 
size|min|mean|max|min|mean|max|min|mean|max|min|mean|max|min|mean|max|
|4|20179.995|20239.475|20250.999|24258.298|24286.424|24297.904|20|20|20|23929.66|24021.811|24032.953|19|19|19|
|8|20175.597|20228.107|20240.895|22218.243|22251.717|22260.572|10|10|10|22009.894|22042.68|22050.396|9|9|9|
|16|19520.124|19589.628|19598.353|22089.079|22111.043|22118.656|13|13|13|21742.71|21780.105|21796.334|11|11|11|
|20|18427.668|18489.516|18499.058|18230.004|18556.874|18758.163|-1|0|1|17462.533|17768.048|17808.481|-5|-4|-4|
|32|17366.043|17700.693|18987.718|21333.877|21365.919|21374.385|23|21|13|19529.033|19646.884|19659.683|12|11|4|
|50|17383.56|17439.878|17519.008|18326.74|18475.674|18688.731|5|6|7|16775.091|16790.448|16798.04|-4|-4|-4|
|64|18007.581|18124.243|18138.866|19086.25|21077.556|21127.126|6|16|16|18027.712|18144.897|18158.497|0|0|0|
|100|14854.175|14939.755|14957.926|15708.965|15966.999|16002.11|6|7|7|14686.466|14725.467|14741.717|-1|-1|-1|
|128|12879.8|14238.741|14406.042|19086.495|19308.204|19335.857|48|36|34|13817.619|14019.693|14682.579|7|-2|2|
|200|10595.317|11168.928|11306.439|14495.604|14679.285|14707.823|37|31|30|13701.405|13728.255|13735.985|29|23|21|
|256|10054.941|10170.204|10451.762|14563.739|15003.766|15061.606|45|48|44|10902.351|10983.121|11032.754|8|8|6|
|512|6543.403|6599.115|6610.697|10325.164|10382.276|10390.722|58|57|57|7361.069|7410.172|7418.975|12|12|12|
|1024|3810.905|3827.994|3835.482|7003.569|7025.902|7030.261|84|84|83|4314.714|4325.268|4328.757|13|13|13|
|2048|1965.738|2038.953|2042.825|4023.562|4084.072|4088.709|105|100|100|2409.852|2413.554|2416.365|23|18|18|
|4096|1060.86|1066.341|1067.135|2021.194|2218.651|2225.33|91|108|109|1294.663|1309.405|1312.426|22|23|23|
|8192|545.547|547.181|547.518|1126.356|1135.267|1136.248|106|107|108|678.991|680.187|681.287|24|24|24|
|16384|268.177|275.345|275.943|577.081|582.751|584.022|115|112|112|339.917|342.003|342.851|27|24|24|



> Replace/improve HBase's byte[] comparator
> -----------------------------------------
>
>                 Key: HBASE-17877
>                 URL: https://issues.apache.org/jira/browse/HBASE-17877
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Vikas Vishwakarma
>         Attachments: 17877-1.2.patch, 17877-v2-1.3.patch, 17877-v3-1.3.patch, 
> 17877-v4-1.3.patch, ByteComparatorJiraHBASE-17877.pdf
>
>
> [~vik.karma] did some extensive tests and found that Hadoop's version is 
> faster - dramatically faster in some cases.
> Patch forthcoming.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to