Joshua Landau added the comment:

> The problem with using STORE_MAP is you create a new dict for each keyword 
> argument in that situation.

You don't; if you look at the disassembly for producing a built-in dict 
("dis.dis('{1:2, 2:3, 3:4}')") you'll see they use STORE_MAP too. STORE_MAP 
seems to just be the map equivalent of LIST_APPEND.

I've done simple timings that show my version being faster...

Unfortunately, it points out there is definitely a memory leak. This reproduces:

    def f(a):
        pass

    while True:
        f(**{}, a=1)

This goes for both patches 8 and 9.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to