Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77742

Re: weakref, memory management and execution slow down in PyQt4

References (3 earlier) <540CB15C.2060008@gmail.com> <540CC278.4050106@riseup.net> <540E40FD.8030706@gmail.com> <540E69AF.5040309@riseup.net> <540F1D83.1010602@gmail.com>
Date 2014-09-10 01:37 +1000
Subject Re: weakref, memory management and execution slow down in PyQt4
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13906.1410277030.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Sep 10, 2014 at 1:32 AM, Michael Torrie <torriem@gmail.com> wrote:
> Yes you're correct.  It is the equivalent.  But it always involves
> lookup in the object's dictionary, which is big O order O(n log n)
> complexity for each and every access.

Where do you get that figure from? A CPython dictionary is implemented
as a hashtable, so algorithmic complexity of lookups ought to be O(1).

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: weakref, memory management and execution slow down in PyQt4 Chris Angelico <rosuav@gmail.com> - 2014-09-10 01:37 +1000

csiph-web