Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.080 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.01; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:which': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'looks': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'subject:list': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'something': 0.35; 'received:google.com': 0.35; 'shorter': 0.36; 'subject:?': 0.36; 'pm,': 0.38; 'took': 0.61; 'subject:more': 0.64; '2015': 0.84; 'noise': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=p7jQBUt0eYxczJg4hP198/OA5Z8YNe4yqYmiUPB1etE=; b=vrxg93g4XZ4NR9IHYq17/ql7QoeHEG/xTpQB45Srk0veAh9q8d7eqGEHO5fgxO/O7p n6koT9CVqXfuvfvVf5Jx0l64N3/jqBHdIo7Yek0e6iEr9p411MxHw71HyYh5exl3W16z IfRG+LmbNzX3gWWL+ml8x/aiPg4BV0Vznsn31TUf2t/FwJDaMafSdW+DGdMR+dLIaO8b 7m+g0BzLG/TH0KfTLN37HTgarrLIdnVW4bV8vH18OzJJ6KdxLroK07xiu51jnwUQ6Fyx LtL3n0gGCPpU4qaP4tnoJc3aAtBXQ8eQYi8d8CT5hWHXTLPKSGWWTG5k+RvA2ZVtMq4V UV8g== MIME-Version: 1.0 X-Received: by 10.50.79.200 with SMTP id l8mr6661988igx.14.1420374346550; Sun, 04 Jan 2015 04:25:46 -0800 (PST) In-Reply-To: <7968fa1c-9b4c-4d17-9f71-1bbc55392921@googlegroups.com> References: <5499f48c-26e3-41c5-8735-2641fde5f35e@googlegroups.com> <7968fa1c-9b4c-4d17-9f71-1bbc55392921@googlegroups.com> Date: Sun, 4 Jan 2015 23:25:46 +1100 Subject: Re: list comparison vs integer comparison, which is more efficient? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1420374349 news.xs4all.nl 2854 [2001:888:2000:d::a6]:51064 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83202 On Sun, Jan 4, 2015 at 11:17 PM, austin aigbe wrote: > However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s) which took just 13 function calls to execute. > > Why is this? That looks to me like noise in your stats. One ULP in timing stats? Not something to base *anything* on. ChrisA