Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCFFF9BF7 for ; Thu, 1 Mar 2012 18:16:40 +0000 (UTC) Received: (qmail 93185 invoked by uid 500); 1 Mar 2012 18:16:39 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 93137 invoked by uid 500); 1 Mar 2012 18:16:39 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 93130 invoked by uid 99); 1 Mar 2012 18:16:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 18:16:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 18:16:33 +0000 Received: by werc1 with SMTP id c1so730971wer.35 for ; Thu, 01 Mar 2012 10:16:13 -0800 (PST) Received-SPF: pass (google.com: domain of lucene@mikemccandless.com designates 10.180.78.6 as permitted sender) client-ip=10.180.78.6; Authentication-Results: mr.google.com; spf=pass (google.com: domain of lucene@mikemccandless.com designates 10.180.78.6 as permitted sender) smtp.mail=lucene@mikemccandless.com Received: from mr.google.com ([10.180.78.6]) by 10.180.78.6 with SMTP id x6mr4862790wiw.18.1330625773065 (num_hops = 1); Thu, 01 Mar 2012 10:16:13 -0800 (PST) Received: by 10.180.78.6 with SMTP id x6mr3911609wiw.18.1330625772873; Thu, 01 Mar 2012 10:16:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.167.196 with HTTP; Thu, 1 Mar 2012 10:15:52 -0800 (PST) In-Reply-To: <1330620924.7805.YahooMailNeo@web132205.mail.ird.yahoo.com> References: <1330594799.9644.YahooMailNeo@web132201.mail.ird.yahoo.com> <1330604524.58254.YahooMailNeo@web132204.mail.ird.yahoo.com> <1330609795.77656.YahooMailNeo@web132205.mail.ird.yahoo.com> <1330620924.7805.YahooMailNeo@web132205.mail.ird.yahoo.com> From: Michael McCandless Date: Thu, 1 Mar 2012 13:15:52 -0500 Message-ID: Subject: Re: ConjunctionScorer.doNext() overstays? To: dev@lucene.apache.org, mark harwood Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnFi0ebRfPX5G4zU8sXfS5xfDPCB5FymXuLBT4KG300moogZfV+dobjZOddTfIt4HfBZ7xb X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 1, 2012 at 11:55 AM, mark harwood wro= te: > Based on your comments re the added int comparison cost in that "hot" loo= p it made me think that the abstract docIdSetIterator.docId() method call c= ould be questioned on that basis too? > It looks like all=A0DocIdSetIterator=A0subclasses maintain a doc variable= mutated elsewhere in advance() and next() calls and docID() is meant to be= idempotent so presumably a shared variable in the base class could avoid a= docID() method invocation? > Anyhoo the profiler did not show that method up as any sort of hotspot so= I don't think it's an issue. Maybe we could explore that? I'm not sure about hotspot implications though... (vs private int accessible only via getter). Ideally, consumers of DISI should hold onto the int docID returned from next/advance and use that... (ie, don't call docID() again, unless it's too hard to hold onto the returned doc). > Thanks, Mike. Thank you! Keep the ideas coming :) Mike McCandless http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org