Serhiy Storchaka wrote:
PyDict_Merge() is called every time when you have a call like `f(a=1, **kw)`
So would not be worth to add slots for keys (and maybe for values and items) to the tp_as_mapping structure?
Only if looking up those methods is taking a substantial proportion of time. Measurements will be needed to find out.