Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86372
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!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 | <davea@davea.name> |
| 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; '"this': 0.03; 'cpython': 0.05; 'sufficient': 0.05; 'that?': 0.05; '64-bit': 0.07; 'exception.': 0.09; 'happen?': 0.09; 'sure,': 0.09; 'python': 0.11; 'element,': 0.16; 'elements,': 0.16; 'sorting.': 0.16; 'throw': 0.16; 'elements': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'figures': 0.19; 'feb': 0.22; 'saying': 0.22; 'header:User- Agent:1': 0.23; 'bytes': 0.24; 'skip': 0.24; 'stick': 0.24; 'source': 0.25; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'fixed': 0.29; 'chris': 0.29; 'leave': 0.29; 'am,': 0.29; 'array': 0.29; 'absolute': 0.30; 'that.': 0.31; '25,': 0.31; 'lists': 0.32; 'guess': 0.33; 'comment': 0.34; 'could': 0.34; 'test': 0.35; 'but': 0.35; 'shows': 0.36; 'too': 0.37; 'list': 0.37; 'minimum': 0.38; 'problems': 0.38; 'machines': 0.38; 'massive': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'space': 0.40; 'even': 0.60; 'length': 0.61; 'charset:windows-1252': 0.65; 'moments': 0.68; 'received:74.208': 0.68; 'eight': 0.74; 'million': 0.74; '2015': 0.84; 'comment.': 0.84; 'presumably': 0.84 |
| Date | Tue, 24 Feb 2015 21:41:42 -0500 |
| From | Dave Angel <davea@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Bug in timsort!? |
| References | <1cf84559-3a63-4799-a879-ae8e513d387e@googlegroups.com> <CAKJDb-M82fBvFUVf=P65NnVFdcEUjd+932OJQKGQ1mH6E4vwFA@mail.gmail.com> <54ED0B7E.7030801@mrabarnett.plus.com> <CANc-5UzsujX-0X5tLCik+5LP=w5Xwx4N3cd8wxDfG5Ur-E=xiw@mail.gmail.com> <CAPTjJmo=wq-SbqH0RNt4F8RRCy80wCR+KeBPPvoX_TWqwAQ09A@mail.gmail.com> |
| In-Reply-To | <CAPTjJmo=wq-SbqH0RNt4F8RRCy80wCR+KeBPPvoX_TWqwAQ09A@mail.gmail.com> |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:XR5dzmyrDotunVZ+7fkAuG7bwJ/CAafiKWkoqB2NF79 UzfvJgYTv1T3sqljBpbqu/uIl7CDjnRvTIhBj+MqYPlNLnZvkg eP6g8Ddi7pkn9ZPq8K2xQh5r18V1WCy48OtPc7vu9PVGxUJlc1 hG1mndVJZu+t5tpRUsQhmZ7lC12ZRdgH1pMRH3XypNWjcxFG0I 3pMIwe0NxTXLUKheB9fNDOIQwWyKNwxHSLJUQsCxbPLoMuOR9C Z5DdnNteppMsv1rjWwtfwL6C/+6+6lBEfB6WPqwsPkNKqaltSg RIYKQAhNQMOklcgcR86E85jt0JcnmoLomTOYhyv/zQImNw7Hw= = |
| X-UI-Out-Filterresults | notjunk:1; |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19164.1424832117.18130.python-list@python.org> (permalink) |
| Lines | 30 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1424832117 news.xs4all.nl 2835 [2001:888:2000:d::a6]:45175 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:86372 |
Show key headers only | View raw
On 02/24/2015 07:07 PM, Chris Angelico wrote: > On Wed, Feb 25, 2015 at 10:50 AM, Skip Montanaro > <skip.montanaro@gmail.com> wrote: >> Even if/when we get to the point where machines can hold an array of >> 2**49 elements, I suspect people won't be using straight Python to >> wrangle them. > > Looking just at CPython, what is the absolute minimum storage space > for a massive list like that? My guess is that a 64-bit CPython might > get as good as eight bytes per element; playing around with smaller > figures (up to circa a million elements) shows it ranging from 8 to 9 > bytes per element, bottoming out at just a smidge over 8, presumably > at the moments when there's no slack space (there's a fixed overhead, > which gets diminishingly significant). So an array of 2**49 elements > would take 2**52 bytes (4 petabytes) of storage - addressable, to be > sure, but an awful lot to be sorting. > > Would it be sufficient to stick a comment into the source saying "This > may have problems with lists in excess of 2**49 elements", and leave > it until that's actually likely to happen? > > ChrisA > One could do much better than that. Put in a test for the length of the list, and if it's too large for the current implementation, throw an exception. Much better than a comment. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug in timsort!? Roy Smith <roy@panix.com> - 2015-02-24 13:34 -0800
Re: Bug in timsort!? Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-02-24 15:40 -0600
Re: Bug in timsort!? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-24 21:49 +0000
Re: Bug in timsort!? sohcahtoa82@gmail.com - 2015-02-24 14:36 -0800
Re: Bug in timsort!? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-25 00:38 +0000
Re: Bug in timsort!? Grant Edwards <invalid@invalid.invalid> - 2015-02-24 22:45 +0000
Re: Bug in timsort!? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-24 15:59 -0700
Re: Bug in timsort!? Robert Kern <robert.kern@gmail.com> - 2015-02-25 11:34 +0000
Re: Bug in timsort!? Grant Edwards <invalid@invalid.invalid> - 2015-02-25 15:49 +0000
Re: Bug in timsort!? Chris Angelico <rosuav@gmail.com> - 2015-02-25 10:33 +1100
Re: Bug in timsort!? MRAB <python@mrabarnett.plus.com> - 2015-02-24 23:38 +0000
Re: Bug in timsort!? Skip Montanaro <skip.montanaro@gmail.com> - 2015-02-24 17:50 -0600
Re: Bug in timsort!? Chris Angelico <rosuav@gmail.com> - 2015-02-25 11:07 +1100
Re: Bug in timsort!? Paddy <paddy3118@gmail.com> - 2015-02-25 01:10 -0800
Re: Bug in timsort!? Chris Angelico <rosuav@gmail.com> - 2015-02-25 21:11 +1100
Re: Bug in timsort!? Chris Kaynor <ckaynor@zindagigames.com> - 2015-02-24 16:38 -0800
Re: Bug in timsort!? Terry Reedy <tjreedy@udel.edu> - 2015-02-24 21:52 -0500
Re: Bug in timsort!? Dave Angel <davea@davea.name> - 2015-02-24 21:41 -0500
Re: Bug in timsort!? Ned Deily <nad@acm.org> - 2015-02-25 01:04 -0800
Re: Bug in timsort!? Sturla Molden <sturla.molden@gmail.com> - 2015-02-25 14:58 +0100
Re: Bug in timsort!? alister <alister.nospam.ware@ntlworld.com> - 2015-02-25 15:03 +0000
Re: Bug in timsort!? Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-02-25 09:23 -0600
Re: Bug in timsort!? Terry Reedy <tjreedy@udel.edu> - 2015-02-25 16:08 -0500
Re: Bug in timsort!? Roy Smith <roy@panix.com> - 2015-02-25 19:12 -0500
Re: Bug in timsort!? Jonas Wielicki <jonas@wielicki.name> - 2015-02-25 15:07 +0100
Re: Bug in timsort!? Chris Angelico <rosuav@gmail.com> - 2015-02-26 01:33 +1100
Re: Bug in timsort!? Sturla Molden <sturla.molden@gmail.com> - 2015-02-25 16:05 +0100
Re: Bug in timsort!? Chris Angelico <rosuav@gmail.com> - 2015-02-26 02:11 +1100
Re: Bug in timsort!? Peter Otten <__peter__@web.de> - 2015-02-25 17:04 +0100
Re: Bug in timsort!? Mario Figueiredo <marfig@gmail.com> - 2015-02-25 18:22 +0100
Re: Bug in timsort!? Sturla Molden <sturla.molden@gmail.com> - 2015-02-25 19:41 +0100
Re: Bug in timsort!? Jonas Wielicki <jonas@wielicki.name> - 2015-02-25 19:46 +0100
Re: Bug in timsort!? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-25 20:07 +0000
Re: Bug in timsort!? Sturla Molden <sturla.molden@gmail.com> - 2015-02-25 17:44 +0100
Re: Bug in timsort!? Mario Figueiredo <marfig@gmail.com> - 2015-02-25 18:29 +0100
Re: Bug in timsort!? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-26 10:13 +1100
Re: Bug in timsort!? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-25 22:51 -0700
Re: Bug in timsort!? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-25 16:50 +0000
Re: Bug in timsort!? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-25 16:55 +0000
Re: Bug in timsort!? Chris Kaynor <ckaynor@zindagigames.com> - 2015-02-25 08:56 -0800
Re: Bug in timsort!? Chris Angelico <rosuav@gmail.com> - 2015-02-26 04:18 +1100
Re: Bug in timsort!? Peter Otten <__peter__@web.de> - 2015-02-25 18:21 +0100
Re: Bug in timsort!? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-25 12:42 -0700
Re: Bug in timsort!? Serhiy Storchaka <storchaka@gmail.com> - 2015-02-26 09:33 +0200
csiph-web