Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70544
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <amirouche.boubekki@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.046 |
| X-Spam-Evidence | '*H*': 0.91; '*S*': 0.00; 'cpython': 0.05; 'true,': 0.05; 'attribute': 0.07; 'dev': 0.07; 'pypy': 0.07; 'attributes': 0.09; 'url:pypy': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'mostly': 0.14; '23,': 0.16; 'pypy.': 0.16; 'simpson': 0.16; 'subject:object': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'pfxlen:0': 0.19; 'memory': 0.22; 'cc:addr:python.org': 0.22; 'cheers,': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'class.': 0.26; 'header:In-Reply- To:1': 0.27; 'fixed': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'consumption': 0.31; 'probably': 0.32; 'url:python': 0.33; 'used,': 0.33; 'comment': 0.34; 'core': 0.34; "i'd": 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; '+0200,': 0.36; 'object,': 0.36; 'var': 0.36; 'url:listinfo': 0.36; 'similar': 0.36; 'url:org': 0.36; 'skip:& 20': 0.39; 'does': 0.39; 'url:mail': 0.40; 'how': 0.40; 'even': 0.60; 'access,': 0.60; 'increased': 0.61; 'url:3': 0.61; 'back': 0.62; 'save': 0.62; "you'll": 0.62; 'more': 0.64; 'url:blogspot': 0.65; 'to:addr:gmail.com': 0.65; 'url:11': 0.68; 'price': 0.69; 'increase': 0.74; 'analysis': 0.75; 'footprint': 0.84; 'or...': 0.84; 'phil': 0.84; 'url:tech': 0.84; 'url:latest': 0.91; 'balances': 0.93; 'url:fr': 0.93 |
| 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 :cc:content-type; bh=/hVU6g2Ooy2eDAHR2KVMNxGnIijNMGKYEHHm6zFixBM=; b=UTFdxjkKWjiYw+unS0s01Pv7j1xZJYtbucFzSpMriVswy9XAomZ4RfYJvHGCJktvPM MDDuDKXuOWeyvpbI8OjdyI/clS/PLqyljl+8VJv0CDiPRRBbFXuTyW06Wjm96fdSDUjO 9hi3Lj5Jfb2mhJeqlPGHRogbUUFPVAQ3/p0uGfPDkP7CTUB4aBLmCtPGnsZkVH2VfTxW KT0nU50zeBhUDlvgThBwe48BKZbqNit9VpgYeku9RF7QUopnYTLCbmZYrurEcmGw9FlI zGtS7Hf3KfY8fpwDz7uOLXXE2bAyRd+gkMTx1AEBQHypTaYCrCgZwxkTJAu+Lrfj60JB 1hbQ== |
| X-Received | by 10.236.39.242 with SMTP id d78mr68046417yhb.36.1398262906193; Wed, 23 Apr 2014 07:21:46 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <20140423135935.GA17819@phconnel-ws.cisco.com> |
| References | <51d9b7f1-3511-4110-adb2-aa2226bd7a3c@lists.xtsubasa.org> <20140423061123.GA47008@cskk.homeip.net> <CAL7_Mo9Hb44ZPEw2UvKcRDiugw-Voh0y=JoMHqGKYHzY8dyKrA@mail.gmail.com> <20140423135935.GA17819@phconnel-ws.cisco.com> |
| From | Amirouche Boubekki <amirouche.boubekki@gmail.com> |
| Date | Wed, 23 Apr 2014 16:21:26 +0200 |
| Subject | Re: object().__dict__ |
| To | Phil Connell <pconnell@gmail.com> |
| Content-Type | multipart/alternative; boundary=001a1136b766d38d1d04f7b67378 |
| Cc | python-list <python-list@python.org> |
| 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.9467.1398262908.18130.python-list@python.org> (permalink) |
| Lines | 130 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1398262909 news.xs4all.nl 2949 [2001:888:2000:d::a6]:36967 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:70544 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
2014-04-23 15:59 GMT+02:00 Phil Connell <pconnell@gmail.com>: > On Wed, Apr 23, 2014 at 03:48:32PM +0200, Amirouche Boubekki wrote: > > 2014-04-23 8:11 GMT+02:00 Cameron Simpson <cs@zip.com.au>: > > > Look up the "__slots__" dunder var in the Python doco index: > > > > > > https://docs.python.org/3/glossary.html#term-slots > > > > > > You'll see it as a (rarely used, mostly discouraged) way to force a > fixed > > > set of attributes onto a class. As with object, this brings a smaller > > > memory footprint and faster attribute access, but the price is > flexibility. > > > > > > > True, still can be the only way to save few MB or... GB without falling > > back to C or PyPy. > > > > Have a look at PyPy to how to save memory (and speed things up) without > > slots: > > > http://morepypy.blogspot.fr/2010/11/efficiently-implementing-python-objects.html > > Is there any analysis of how this balances increased memory usage from the > JIT > vs the CPython VM (with a reasonable amount of code)? > > I'd thought that one of the main disadvantages of PyPy was drastically > increased memory usage for any decent-sized program. Would be interested to > know if this was not the case :) > I have a similar thought, I don't how that memory consumption increase (a constant? a factor? probably both...) but if the program use an absurd amount of memory even in CPython then PyPy will be able to catchup based on comment #1 of a PyPy core dev in http://tech.oyster.com/save-ram-with-python-slots/ see also http://pypy.readthedocs.org/en/latest/interpreter-optimizations.html#dictionary-optimizations Still it requires more analysis. When does PyPy trigger the optimization? > > > Cheers, > Phil > > -- > https://mail.python.org/mailman/listinfo/python-list >
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: object().__dict__ Amirouche Boubekki <amirouche.boubekki@gmail.com> - 2014-04-23 16:21 +0200 Re: object().__dict__ CHIN Dihedral <dihedral88888@gmail.com> - 2014-04-23 13:25 -0700
csiph-web