[Python-ideas] An identity dict
Antoine Pitrou
solipsis at pitrou.net
Thu Jun 3 22:04:29 CEST 2010
On Thu, 3 Jun 2010 12:02:44 -0700
Philip Jenvey <pjenvey at underboss.org> wrote:
>
> Using id() is a workaround but again, a potentially expensive one for platforms with moving
> GCs. Every object calling for an id() forces additional bookkeeping on their ends. This is
> only a better solution for CPython.
Well, CPython and all other implementations with a non-moving GC.
> Whereas abstracting this out into an identitydict type gives all platforms the chance to
> provide their own optimized versions.
That's really premature optimization.
Regards
Antoine.
More information about the Python-ideas
mailing list