A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-August/082025.html below:

[Python-Dev] class attributes slower in py3k

[Python-Dev] class attributes slower in py3k [Python-Dev] class attributes slower in py3kAntoine Pitrou solipsis at pitrou.net
Wed Aug 27 01:13:13 CEST 2008
Antoine Pitrou <solipsis <at> pitrou.net> writes:
> > >          NormalClassAttribute:    339ms    340ms    0.28us    1.111ms
> > 
> > Over twice as slow?
> 
> Yes, should be investigated.
> 
[...]
> 
> > >         SpecialClassAttribute:    534ms    535ms    0.45us    1.121ms
> > 
> > ~4x slower!
> 
> Should be investigated as well.

It turns out that these two slowdowns are due to classes always being new-style
in py3k. Indeed, if I add "__metaclass__ = type" at the beginning of
Tools/pybench/Lookups.py, 2.6 becomes as slow as 3.0.

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4