In the meanwhile, I updated the code of frozendict to the new 3.10 code. And here I need some help.
As you can see by the new benchs: https://github.com/Marco-Sulla/cpython/blob/frozendict/frozendict/test/bench...
creation of frozendict is not faster anymore. This is because Inada introduced memcpy to do a fast init of a dict from a "good" dict.
I tried to copy the code for frozendict, but I get a good old memory corruption. I passed several hours to understand what I'm doing wrong, without success.
The code is the one commented out at lines 1084 and 2978, starting with a "it does not work" comment... https://github.com/Marco-Sulla/cpython/blob/frozendict/Objects/dictobject.c