Raymond Hettinger added the comment:
I think this looks promising.
Don't worry too much about the modest timing improvement. For the most part,
we should almost always take steps to eliminate work that is known to be
unnecessary. The timings serve as a guide but it would be easy for us to
STINNER Victor added the comment:
avoid memset in small tuple creation
I don't understand this title because there is no call to memset() in the patch.
Can you try to modify PyTuple_New() to use memset() instead of a dummy loop?
Adding a _PyTuple_New() which doesn't initialize the memory
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21148
___
___
Python-bugs-list
New submission from Julian Taylor:
attached a prototype patch that avoids the memset of ob_item in PyTuple_New
which is not necessary for the BUILD_TUPLE bytecode and PyTuple_Pack as these
overwrite every entry in ob_item anyway.
This improves small tuple creation by about 5%.
It does this by
Antoine Pitrou added the comment:
A 5% improvement on a micro-benchmark probably means 0% on real workloads. You
could try to run the benchmarks suite at http://hg.python.org/benchmarks
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org