Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'element': 0.07; 'intel': 0.07; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'language.': 0.14; 'posted': 0.15; 'claims,': 0.16; 'expensive,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'figures': 0.19; 'seems': 0.21; 'header:User-Agent:1': 0.23; 'header:X-Complaints- To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'anyone': 0.31; 'run': 0.32; 'subject:time': 0.33; 'maybe': 0.34; 'but': 0.35; 'seconds': 0.37; 'list': 0.37; 'being': 0.38; 'thank': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'you.': 0.62; 'back': 0.62; 'making': 0.63; 'personal': 0.63; 'our': 0.64; 'provide': 0.64; 'charset:windows-1252': 0.65; 'surprise': 0.74; 'yourself': 0.78; '2015': 0.84; 'claim.': 0.84; 'rue': 0.84; 'witness': 0.84; 'received:89': 0.85 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Slices time complexity Date: Wed, 20 May 2015 21:47:46 +0100 References: <9ceklad15llnv3npejq9iuh91soci8aeqo@4ax.com> <555b0621$0$2753$c3e8da3$76491128@news.astraweb.com> <555b6db8$0$12996$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-89-240-167-240.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432154882 news.xs4all.nl 2897 [2001:888:2000:d::a6]:43728 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90983 On 20/05/2015 20:51, Mario Figueiredo wrote: > On Wed, 20 May 2015 03:07:03 +1000, Steven D'Aprano > wrote: > >> Yes, a slice can be expensive, if you have (say) a ten billion element list, >> and take a slice list[1:]. > > Since nothing seems to surprise you and you seem so adamant on calling > anyone being surprised by it, maybe I will surprise you if you > actually run the code I posted on the OP and witness for yourself that > even on a 50 element list will take 3 seconds to execute on an intel > i5. > Please provide the figures to back up this claim. Nothing personal but we've had problems with the RUE (amongst others) making nonsensical claims, please don't take us down that path, thank you. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence