Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:error': 0.03; 'pypy': 0.07; 'string': 0.09; 'compact': 0.09; 'insertion': 0.09; 'jan': 0.12; '"terry': 0.16; 'deletion': 0.16; 'email addr:udel.edu>': 0.16; 'email name:<tjreedy': 0.16; 'iteration': 0.16; 'processors': 0.16; 'ptr': 0.16; 'reedy"': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'entries': 0.24; 'switched': 0.24; '>': 0.26; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'array': 0.29; 'message-id:@mail.gmail.com': 0.30; '25,': 0.31; 'commonly': 0.31; 'keys': 0.31; 'though.': 0.31; 'this.': 0.32; 'becomes': 0.33; 'received:google.com': 0.35; 'there': 0.35; 'leads': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'space': 0.40; 'how': 0.40; 'cost.': 0.60; 'making': 0.63; 'such': 0.63; '2015': 0.84; 'reductions': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zLUop4Sn/dayH731E77RQAD9i9qWtrMbyBDBKOSiCwc=; b=RprS5NgATVV+vN6DZKtsuBWGklz+7MKxKMpysULLxSXCnS0eJXQ/1XijQcLGbeVMEg 3FsHfPklc61cc485mSnbCY7ZT1ZpR+yU3WEEOfVnW/Wig8A046GmdJtwVkTTc5LcTK7e SPh9+xiSUigcIfqeCOM+y2WbQQiklkH5n8b2lelxmmRM9cSvzzMNHrFa1ThdW7B9ChzM dIEfuix/rAfYV+d45I0o9GNGljA5YCuQUpJkpdHaKQ/CZQCFFLDuMoKbNkp7d4RoAoXA GJ6//NQzYAzmez9BZ/4R71m2MQNLWDsASGOadYz9SH1bEnt+NmMwwb7nEdVtaTvQDpY3 1ecA== MIME-Version: 1.0 X-Received: by 10.70.55.168 with SMTP id t8mr30126377pdp.147.1422238873332; Sun, 25 Jan 2015 18:21:13 -0800 (PST) In-Reply-To: References: <1a194e0a0b738d205de54180fa7@nntp.aioe.org> <54c39366$0$13006$c3e8da3$5496439d@news.astraweb.com> <54c4606a$0$13002$c3e8da3$5496439d@news.astraweb.com> <54c4dae1$0$13005$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 25 Jan 2015 19:21:13 -0700 Subject: Re: __bases__ misleading error message From: Ian Kelly To: Python Content-Type: multipart/alternative; boundary=089e0158c27ed4b372050d84ca78 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: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422238882 news.xs4all.nl 2833 [2001:888:2000:d::a6]:47104 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84587 --089e0158c27ed4b372050d84ca78 Content-Type: text/plain; charset=UTF-8 On Jan 25, 2015 2:37 PM, "Terry Reedy" wrote: > 2. the second array is a compact array of entries in insertion order, such as > > [hash, ptr to 'x', ptr to 23] > [hash, ptr to 'colour', ptr to 'red'] > [hash, ptr to the string 'y', ptr to the int 42] > > Iteration would use the compact array, making all dicts OrderedDicts. Pypy has already switched to this. It seems that on modern processors with multilevel on-chip caches, the space reduction leads to cache-miss reductions that compensate for the indirection cost. Deletion becomes O(n) though. Has there been any investigation into how commonly deletion of keys is done? --089e0158c27ed4b372050d84ca78 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Jan 25, 2015 2:37 PM, "Terry Reedy" <tjreedy@udel.edu> wrote:
> 2. the second array is a compact array of entries in insertion order, = such as
>
> =C2=A0 =C2=A0 [hash, ptr to 'x', ptr to 23]
> =C2=A0 =C2=A0 [hash, ptr to 'colour', ptr to 'red'] > =C2=A0 =C2=A0 [hash, ptr to the string 'y', ptr to the int 42]=
>
> Iteration would use the compact array, making all dicts OrderedDicts. = Pypy has already switched to this.=C2=A0 It seems that on modern processors= with multilevel on-chip caches, the space reduction leads to cache-miss re= ductions that compensate for the indirection cost.

Deletion becomes O(n) though. Has there been any investigati= on into how commonly deletion of keys is done?

--089e0158c27ed4b372050d84ca78--