logoalt Hacker News

vlovich123yesterday at 9:06 PM1 replyview on HN

I’m curious why the dict->frozendict operation is not an O(1) operation when there’s a refcnt of 1 on the dict - that resolves the spooky action at a distance problem raised and solves the performance for the most common usage pattern (build up the dict progressively and convert to a frozendict for concurrent reads).


Replies

emil-lptoday at 7:56 AM

Because optimizations are not added to the PEP, but added later.