Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'tree': 0.05; 'subject:Python': 0.06; 'memory.': 0.07; 'exception,': 0.09; 'exception.': 0.09; 'overflow': 0.09; 'exception': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'stack': 0.19; 'fit': 0.20; 'balancing': 0.24; 'possibly': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'getting': 0.31; 'maybe': 0.34; "can't": 0.35; 'received:google.com': 0.35; 'done': 0.36; 'should': 0.36; 'christian': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'hope': 0.61; 'helps': 0.61; "you're": 0.61; '2015': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=yhxUl0lShMNgttbQFilbpUyU81iwWo90eYQPgx9FwG4=; b=syrDV5qKf8Whom4hNwfworFES+nX9cCYiFBv8eRO+VWtijToMwtfejWAcDV+VPH/rb x1RXOoLmhuQmAHXFy7SXgpDn+a/Z1akKx8lHNtihpAqNRCLYqxdAftdaVG+FwyBBauB+ E9Yf3cECuCkP7pHAr+VMQbzGHk4ew742tw8V9JknjPWiiSVYFiJvmDIk49gTk4ScBJ/M lokHJEB6FtruWryvoSfRiROpDgp6K/DdfNuZvq8TIliozcfZUP/9WLOJ0xGAoDRLQtdH HUwDFgGKsGHb73IYkDncIVclJLW5uKFpQn5ciieEaVC+EYvwv4l5XBFzZzqdn5Ldmdkk f0mw== X-Received: by 10.42.226.8 with SMTP id iu8mr19932170icb.17.1430581551883; Sat, 02 May 2015 08:45:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87383fkxy0.fsf@elektro.pacujo.net> References: <87mw1q9jqw.fsf@Equus.decebal.nl> <87383hj4zj.fsf@elektro.pacujo.net> <87d22lx38x.fsf@Equus.decebal.nl> <55432557$0$12994$c3e8da3$5496439d@news.astraweb.com> <87383fo062.fsf@Equus.decebal.nl> <87egmzl4yr.fsf@elektro.pacujo.net> <87a8xnl2r6.fsf@elektro.pacujo.net> <87383fkxy0.fsf@elektro.pacujo.net> From: Ian Kelly Date: Sat, 2 May 2015 09:45:11 -0600 Subject: Re: Python is not bad ;-) To: Python Content-Type: text/plain; charset=UTF-8 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430581560 news.xs4all.nl 2867 [2001:888:2000:d::a6]:57495 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89775 On Sat, May 2, 2015 at 5:42 AM, Marko Rauhamaa wrote: > Christian Gollwitzer : > >> That's why I still think it is a microoptimization, which helps only >> in some specific cases. > > It isn't done for performance. It's done to avoid a stack overflow > exception. If your tree is balanced, then the number of items you would need to have to get a stack overflow exception would be approximately 2 ** 1000, which you can't possibly hope to fit into memory. If your tree is unbalanced and you're getting a stack overflow exception, then maybe you should think about balancing it.