On Tue, Dec 28, 2021 at 4:41 PM Marco Sulla <marco.sulla.pyt...@gmail.com> wrote: > > Hi, Inada Senpai. So I do not need PyObject_GC_Track on cloning or > merging, or MAINTAIN_TRACKING on insert? >
Your case is special. You want to create a frozendict which performance is same to builtin dict. Builtin dict has special optimization which tightly coupled with current CPython implementation. So you need to use private APIs for MAINTAIN_TRACKING. But PyObject_GC_Track() is a public API. Regards, -- Inada Naoki <songofaca...@gmail.com> -- https://mail.python.org/mailman/listinfo/python-list