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


Groups > comp.lang.python > #77744 > unrolled thread

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

Started byMichael Torrie <torriem@gmail.com>
First post2014-09-09 09:57 -0600
Last post2014-09-09 09:57 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: weakref, memory management and execution slow down in PyQt4 Michael Torrie <torriem@gmail.com> - 2014-09-09 09:57 -0600

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

FromMichael Torrie <torriem@gmail.com>
Date2014-09-09 09:57 -0600
SubjectRe: weakref, memory management and execution slow down in PyQt4
Message-ID<mailman.13909.1410278232.18130.python-list@python.org>
On 09/09/2014 09:37 AM, Chris Angelico wrote:
> 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).

You're right, it is.  My mistake.  Guess the main issue is the overhead
of an additional function call.  A dict directly or a list directly may
me faster.

Anyway, I guess we're wandering in the weeds a bit as the original issue
is probably not related to his unorthodox choice of metaprogramming as a
data model.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web