Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 64A2D17A09 for ; Fri, 20 Mar 2015 14:32:52 +0000 (UTC) Received: (qmail 50871 invoked by uid 500); 20 Mar 2015 14:32:52 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 50843 invoked by uid 500); 20 Mar 2015 14:32:52 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 50828 invoked by uid 99); 20 Mar 2015 14:32:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2015 14:32:52 +0000 Date: Fri, 20 Mar 2015 14:32:52 +0000 (UTC) From: "Benedict (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8988) Optimise IntervalTree MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14371377#comment-14371377 ] Benedict commented on CASSANDRA-8988: ------------------------------------- compare() would erase to the same function, so we have to call it something else. We could call it asymCompare() or something, but I felt compare2 was no uglier. binarySearch we could switch, for sure, although I don't totally like calling it that when the semantics are different (don't mind too much though), but we will have the same namespace clash if we ever provide the improved semantics for non-asymmetric comparisons, so it would have to be asymBinarySearch or binarySearch2, or whatever. Got better suggestions for inclusivei, returni, search and find? I thought they were pretty descriptive! find == thing to find search == thing to search (in) - i suppose you could suffix that with (for) in your head, but it would be atypical usage. Perhaps searchIn and searchFor? Matching binarySearch nomenclature more closely as well inclusivei / returni i'm just not sure how to improve very much. If you think it's clearer we could defer to a member variable for these, although actually i would find that harder to read (the formal proofs are also inline in the methods). We could certainly transform returni() back to result(), but thought it better mirrored selecti() as stands. Perhaps selecti() could be compareComparisonResultTo() and returns the bound we compare against directly? > 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: Minor > Fix For: 3.0 > > 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)