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

Hudson commented on CASSANDRA-2850:
-----------------------------------

Integrated in Cassandra-0.8 #244 (See 
[https://builds.apache.org/job/Cassandra-0.8/244/])
    Speedup bytes to hex conversions dramatically
patch by dallsopp; reviewed by slebresne for CASSANDRA-2850

slebresne : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152265
Files : 
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
* 
/cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/utils/ByteBufferUtilTest.java
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/utils/FBUtilities.java


> Converting bytes to hex string is unnecessarily slow
> ----------------------------------------------------
>
>                 Key: CASSANDRA-2850
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2850
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: David Allsopp
>            Assignee: David Allsopp
>            Priority: Minor
>             Fix For: 0.8.3
>
>         Attachments: 2850-rebased.txt, 2850-v2.patch, 2850-v4.patch, 
> 2850-v4a.patch, 2850-v5.patch, 2850-v6_08.patch, BytesToHexBenchmark.java, 
> BytesToHexBenchmark2.java, BytesToHexBenchmark3.java, cassandra-2850a.diff
>
>
> ByteBufferUtil.bytesToHex() is unnecessarily slow - it doesn't pre-size the 
> StringBuilder (so several re-sizes will be needed behind the scenes) and it 
> makes quite a few method calls per byte.
> (OK, this may be a premature optimisation, but I couldn't resist, and it's a 
> small change)
> Will attach patch shortly that speeds it up by about x3, plus benchmarking 
> test.

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

        

Reply via email to