Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; ';-)': 0.03; 'integers': 0.09; 'objects,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'worse': 0.09; 'integers,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sorting': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'sort': 0.25; 'references': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'absolute': 0.30; 'that.': 0.31; 'object.': 0.31; 'overhead': 0.31; "they'll": 0.31; 'another': 0.32; 'actual': 0.34; 'could': 0.34; 'add': 0.35; 'ram': 0.36; 'two': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; "you're": 0.61; 'our': 0.64; 'charset:windows-1252': 0.65; 'each,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Sturla Molden Subject: Re: Bug in timsort!? Date: Wed, 25 Feb 2015 16:05:19 +0100 References: <1cf84559-3a63-4799-a879-ae8e513d387e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 164-74-11.connect.netcom.no User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424876731 news.xs4all.nl 2871 [2001:888:2000:d::a6]:37063 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86406 On 25/02/15 15:33, Chris Angelico wrote: > It's even worse than that. Unless you have a list of 2**49 references > to the same few objects, you're going to need to have some actual > content for each one. The absolute best you could do is to sort > integers, which would take 32 bytes each [1]; if you're sorting > strings, they'll be 90 bytes each, so the integers are our best bet. > So add another *five* powers of two to the RAM requirements. In that case you also need to add the PyObject_HEAD overhead for each object. ;-) Sturla