[
https://issues.apache.org/jira/browse/CASSANDRA-6934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13984190#comment-13984190
]
Sylvain Lebresne commented on CASSANDRA-6934:
---------------------------------------------
I've pushed an additional commit on top of that last branch at
https://github.com/pcmanus/cassandra/commits/6934-v2 that addresses the
following remaining remarks/nits:
* ColumnToCollectionType should not be 'byte order comparable' since it's
compare() != compareCollectionMembers(). It follows that the compare() override
in CompoundSparseCellNameType.WithCollection don't have to bother checking
isByteOrderComparable since it can't be.
* I believe the previous Composite.EOC.prefixComparisonResult was correct, but
the new prefixCompare() is not. That is, if s1 is a strict prefix of s2, we
should not take s2.eoc() into account no matter what (the EOC basically applies
to the end component only). So I reverted back to the previous version (with an
additional comment).
* DynamicCompositeType should never be 'byte order comparable'.
* We can simplify AbstractSimpleCellNameType/SimpleCType compare() further
because we don't have EOC for simple names (or rather, they're always NONE --
the +/-Inf patch would have changed that, but since we don't do it). 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').
* There was unrelated changes to CassandraDaemon for some reason, and a unused
import in AbstractCompoundCellNameType. I removed those.
Can you share your benchmark/benchmark results for this for the records?
One last nit: mind taking a shot at replacing the "TODO: Could use some comment
on why that's a useful optimization to do" comment in NodeBuilder.update() with
an actual explanation?
> 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)