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

Benedict commented on CASSANDRA-6755:
-------------------------------------

I've pushed a branch 
[here|https://github.com/belliottsmith/cassandra/tree/6755-bes]

The changes largely involve extracting all extra costs to be incurred once per 
set-of comparisons (i.e. once per search), instead of once per component per 
item. I've also fixed handling of non-byteorder-comparable types, and I've 
removed @Inline calls from everywhere not related directly to this ticket, as 
any introductions elsewhere should probably have their own discussion. This 
branch is now slightly faster for the simple types case, and (whilst I haven't 
yet tested it) should be faster still for composite types. At the same time, 
I've also slightly reduced the instruction overhead from inlining by restoring 
the old loop behaviour for the final 8-bytes in FastByteOperations.compare, and 
*most importantly* (for review purposes) I have imposed as a precondition for 
calling compare() that an empty composite is never provided (since in almost 
all cases one wasn't already). [~slebresne] I'd appreciate a quick review of 
just that particular part of the change, to confirm it makes sense. Mostly it 
was only happening in validation logic, ironically. Finally, I also slightly 
optimised the cost of cloning components back onto the heap, though I didn't 
see any net effect from this.

> Optimise CellName/Composite comparisons for NativeCell
> ------------------------------------------------------
>
>                 Key: CASSANDRA-6755
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6755
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Benedict
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: performance
>             Fix For: 2.1.1
>
>         Attachments: 6755.txt, 6755v2.txt
>
>
> As discussed in CASSANDRA-6694, to reduce temporary garbage generation we 
> should minimise the incidence of CellName component extraction. The biggest 
> win will be to perform comparisons on Cell where possible, instead of 
> CellName, so that Native*Cell can use its extra information to avoid creating 
> any ByteBuffer objects



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to