[issue29312] Use FASTCALL in dict.update()

Raymond Hettinger report at bugs.python.org
Thu Jan 19 01:48:40 EST 2017


Raymond Hettinger added the comment:

I like the other AC changes to dict in 29311, but this one seems like it shouldn't be done.  There is too much twisting around existing code to force it to use AC and the benefit will be almost nothing.   dict.update() is mainly used with a list of tuples argument or with another mapping.  The O(1) time spent on the method call is inconsequential compared to the O(n) step of looping over all the inputs and putting them in the dict.  Accordingly, I think this method should be skipped, leaving the current clear, stable, fast-enough code in-place.

----------
nosy: +rhettinger

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


More information about the Python-bugs-list mailing list