[issue20416] Marshal: special case int and float, don't use references

Serhiy Storchaka report at bugs.python.org
Thu Feb 13 20:29:29 CET 2014


Serhiy Storchaka added the comment:

> As a compromise, we could suppress the sharing for small int objects, since they are singletons, anyway.

This is implementation detail.

But we can use more efficient way to memoizating small int objects.

I also suppose than efficient C implementation of IdentityDict will significant decrease an overhead (may be 2 times). As far as this is probably a first case for which IdentityDict give significant benefit, I'll provide an implementation for 3.5.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20416>
_______________________________________


More information about the Python-bugs-list mailing list