Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'cool.': 0.16; 'fnmatch': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'to:addr:web.de': 0.16; 'two.': 0.16; 'laura': 0.18; 'python?': 0.18; 'cc:addr:python.org': 0.21; 'cc:2**1': 0.22; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'wondering': 0.25; 'switch': 0.27; '+0200,': 0.27; 'this.': 0.28; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'could': 0.35; 'skip:> 10': 0.35; 'there': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'thank': 0.39; 'header:Message-Id:1': 0.62; 'more.': 0.62; 'received:89': 0.80; 'gain': 0.81; 'otten': 0.84 To: Peter Otten <__peter__@web.de> cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Find in ipython3 In-Reply-To: Message from Peter Otten <__peter__@web.de> of "Sun, 07 Jun 2015 12:27:05 +0200." References: <87y4k2hyvf.fsf@Equus.decebal.nl> <87bnguhbec.fsf@Equus.decebal.nl> <874mmlqhul.fsf@Equus.decebal.nl> <87sia4ox8h.fsf@Equus.decebal.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3585.1433682103.1@fido> Date: Sun, 07 Jun 2015 15:01:43 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Sun, 07 Jun 2015 15:01:49 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433682115 news.xs4all.nl 2836 [2001:888:2000:d::a6]:56991 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92245 In a message of Sun, 07 Jun 2015 12:27:05 +0200, Peter Otten writes: >> There is no gain to get in standard Python? By switching from fnmatch >> to re I got almost a speed gain of two. So I was wondering if I could >> do more. > >Just wait for Python 3.5. The switch from os.listdir() to the (new) >os.scandir() in the implementation of os.walk() is likely to improve the >situation: Oh cool. I had no idea. Thank you for showing us this. Laura