What's the public API alternative to _PyObject_GC_IS_TRACKED()?
Inada Naoki
songofacandy at gmail.com
Tue Dec 28 06:38:30 EST 2021
On Tue, Dec 28, 2021 at 4:41 PM Marco Sulla
<Marco.Sulla.Python at 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 <songofacandy at gmail.com>
More information about the Python-list
mailing list