Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82262

Re: Nested loops is strangely slow, totally at a loss.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <i@introo.me>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.075
X-Spam-Evidence '*H*': 0.85; '*S*': 0.00; 'logic': 0.09; '"in"': 0.16; 'iteration.': 0.16; 'subject:slow': 0.16; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'concern': 0.31; 'received:74.125.82': 0.34; 'problem': 0.35; 'received:google.com': 0.35; 'example,': 0.37; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'received:74.125': 0.39; 'to:addr:python.org': 0.39; 'first': 0.61
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=bgKz9a9DkPzTtYJMCGkF9gd5rGGhDeXNQhbnQzlUYDc=; b=a76vmP99mf0eyI6Ek8u/XotYf2hQi7ihqr0hoU+p/IbuD3owsl+T+VqLvNsyi/Ihpj GYwbZAwvOP1yFPYjriUm4NrxLlxY3hbBC6TKWedqVRzpfk1ABPstadk7+hgud/yyKw2E FTbTEHUgVUdGzwo8OawC4G+NcbOHFYEpo95/hQpnnQTqZGwgJ/2zoqPVzk0qS3YozaGU kFb7b1H3QeHwLl/G1A3FUGS5mPjyqfUnCrVHPH9apn4Ed+ZU2qGGgqYma9bW5ryS5PsN Hs44YFUKhkQ8REw4GRUpTB+pWzkeSPoxnqPl0rTDKLJz0r7TAcSGE3rdHPdUgry65iQc Ed/Q==
X-Gm-Message-State ALoCoQmg+ZxnF0jSmp1kXxjmM/NL65TnGVKJF/ckisb7sd44SreY4b6a7PDnq7wJhwYHm9qvMlLj
MIME-Version 1.0
X-Received by 10.181.13.242 with SMTP id fb18mr3163542wid.1.1418189023869; Tue, 09 Dec 2014 21:23:43 -0800 (PST)
X-Originating-IP [175.159.104.33]
In-Reply-To <20141210052025.GA84184@FuzzyHorror>
References <20141210052025.GA84184@FuzzyHorror>
Date Wed, 10 Dec 2014 13:23:43 +0800
Subject Re: Nested loops is strangely slow, totally at a loss.
From Shiyao Ma <i@introo.me>
To Python <python-list@python.org>
Content-Type multipart/alternative; boundary=f46d043c05c4fe11f50509d5dc42
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16795.1418192634.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418192634 news.xs4all.nl 2852 [2001:888:2000:d::a6]:39340
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3382
X-Received-Body-CRC 4257826904
Xref csiph.com comp.lang.python:82262

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

One thing to note, the logic of using "in" is not of concern here.
This is a *contrived* example, the problem is the slowness of the first
iteration.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Nested loops is strangely slow, totally at a loss. Shiyao Ma <i@introo.me> - 2014-12-10 13:23 +0800

csiph-web