Message234416
> 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. |
|
Date |
User |
Action |
Args |
2015-01-21 00:17:12 | Joshua.Landau | set | recipients:
+ Joshua.Landau, gvanrossum, twouters, georg.brandl, terry.reedy, paul.moore, ncoghlan, belopolsky, giampaolo.rodola, ezio.melotti, eric.araujo, andybuckley, r.david.murray, zbysz, eric.snow, Rosuav, berker.peksag, pconnell, NeilGirdhar, Jeff.Kaufman, SpaghettiToastBook |
2015-01-21 00:17:12 | Joshua.Landau | set | messageid: <1421799432.62.0.758483278026.issue2292@psf.upfronthosting.co.za> |
2015-01-21 00:17:12 | Joshua.Landau | link | issue2292 messages |
2015-01-21 00:17:12 | Joshua.Landau | create | |
|