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

Branimir Lambov commented on CASSANDRA-8988:
--------------------------------------------

[218|https://github.com/apache/cassandra/compare/trunk...belliottsmith:8988#diff-e675fa5966322284415eff48ec0b36ffR218]:
 Why not just define maxOrdering to be reversed and save the indirection?

[234|https://github.com/apache/cassandra/compare/trunk...belliottsmith:8988#diff-e675fa5966322284415eff48ec0b36ffR234]:
 This is never true (low <= center <= min <= max). I think you mean high < min 
here.

[251|https://github.com/apache/cassandra/compare/trunk...belliottsmith:8988#diff-e675fa5966322284415eff48ec0b36ffR251]:
 Same thing, should be low > max. 

I'd keep the order of the compared elements the same (searchInterval on the 
right side of compareTo's) throughout for clarity.

If comparison is expensive, I'd consider binary search through 
intersectsLeft/Right.


> Optimise IntervalTree
> ---------------------
>
>                 Key: CASSANDRA-8988
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8988
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Trivial
>             Fix For: 2.1.4
>
>         Attachments: 8988.txt
>
>
> We perform a lot of unnecessary comparisons in 
> IntervalTree.IntervalNode.searchInternal.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to