Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:edu.au': 0.07; 'cc:addr:python-list': 0.15; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'paulo': 0.16; 'received:202.125.174': 0.16; 'received:202.125.174.133': 0.16; 'received:boardofstudies.nsw.edu.au': 0.16; 'received:cskk.homeip.net': 0.16; 'received:harvey.boardofstudies.nsw.edu.au': 0.16; 'received:homeip.net': 0.16; 'received:nsw.edu.au': 0.16; 'thru': 0.16; 'wrote:': 0.16; 'this?': 0.19; 'seems': 0.19; 'cheers,': 0.20; 'suggest': 0.20; 'cc:no real name:2**0': 0.21; 'subject:list': 0.21; 'header:In-Reply-To:1': 0.22; 'alan': 0.23; 'cc:2**0': 0.25; 'effect': 0.28; 'lab': 0.28; 'cc:addr:python.org': 0.29; 'btw,': 0.30; 'iterating': 0.30; 'kay': 0.30; 'quite': 0.31; 'it.': 0.33; 'header:User-Agent:1': 0.33; 'thank': 0.35; 'copying': 0.35; 'things': 0.35; 'received:au': 0.36; 'charset:us-ascii': 0.36; 'run': 0.37; 'unless': 0.37; 'enough': 0.37; 'think': 0.38; 'subject:from': 0.39; 'subject:: ': 0.39; 'difference': 0.40; 'most': 0.60; 'company': 0.61; 'hope': 0.61; 'your': 0.61; 'cost': 0.62; 'received:202': 0.65; 'cameron': 0.77; 'subject:2nd': 0.84; 'timings': 0.84; 'subject:huge': 0.91 Date: Wed, 1 Feb 2012 15:55:24 +1100 From: Cameron Simpson To: Paulo da Silva Subject: Re: Iterate from 2nd element of a huge list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) References: Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328072129 news.xs4all.nl 6886 [2001:888:2000:d::a6]:45303 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19687 On 01Feb2012 03:34, Paulo da Silva wrote: | Em 01-02-2012 03:16, Paulo da Silva escreveu: | > I think iter is nice for what I need. | > Thank you very much to all who responded. | | BTW, iter seems faster than iterating thru mylist[1:]! I would hope the difference can be attributed to the cost of copying mylist[1:]. Do your timings suggest this? (Remembering also that for most benchmarking you need to run things many times unless the effect is quite large). Cheers, -- Cameron Simpson DoD#743 http://www.cskk.ezoshosting.com/cs/ Any company large enough to have a research lab is large enough not to listen to it. - Alan Kay