cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6755) Optimise CellName/Composite comparisons for NativeCell
Date Mon, 23 Jun 2014 14:51:26 GMT


Benedict commented on CASSANDRA-6755:

I've pushed a branch [here|]

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, 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:
>             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

View raw message