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

Benedict commented on CASSANDRA-6934:
-------------------------------------

Thanks

bq. As a side note, I'd really rather avoid using | (instead of ||) for 
conditions: the one line of code it saves is not worth the unusual syntax imo 
(where unusual means 'for the Cassandra code base').

Whilst I don't mind too much either way on this one, it was less to save a line 
of code and more to save a branch prediction slot in the CPU. It's a pretty 
micro-optimisation so unlikely to be measurable in our current state, but the 
branch prediction is almost certainly useless here and we can predict more 
accurately (which is all \| really does instead of \|\|). FTR, there are some 
places where I will definitely want to use it in future (e.g. associative 
cache) to permit better pipelining and optimisation.

Otherwise changes LGTM. I've pushed a [commented 
branch|https://github.com/belliottsmith/cassandra/tree/6934-v2], which also has 
a warning on the optimisation in SimpleCType and AbstractSimpleCellNameType on 
the optimisation that depends on ColumnSlice start/finish semantics

> Optimise Byte + CellName comparisons
> ------------------------------------
>
>                 Key: CASSANDRA-6934
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6934
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Benedict
>            Assignee: Benedict
>              Labels: performance
>             Fix For: 2.1.0
>
>
> AbstractCompositeType is called a lot, so deserves some heavy optimisation. 
> SimpleCellNameType can be optimised easily, but should explore other 
> potential optimisations.



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

Reply via email to