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/2007-February/071237.html below:

[Python-Dev] Py2.6 ideas

[Python-Dev] Py2.6 ideasPhillip J. Eby pje at telecommunity.com
Fri Feb 16 17:41:51 CET 2007
At 01:38 PM 2/16/2007 +0100, Martin v. Löwis wrote:
>Nick Coghlan schrieb:
> > However, another aspect that occurred to me is that inheriting from
> > tuple has significant practical benefits in terms of speed and memory
> > consumption, at which point it doesn't seem worthwhile to *remove* the
> > indexing capability.
>
>I'm not so sure that inheriting from tuple, and giving it named fields,
>has significant speed and memory benefits. In particular for the memory
>benefits, you can use __slots__ to achieve the same effects, and more
>efficiently so (because it you don't store the tuple length). As for
>speed, I would have to see measurements to be convinced it is faster.

For an otherwise-pure Python implementation, the performance benefit of 
inheriting from a tuple is in having ready-made C implementations of 
hashing and comparison.

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