←back to thread

191 points jwilk | 1 comments | | HN request time: 0.001s | source
Show context
vlovich123 ◴[] No.46237164[source]
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(1): >>46241875 #
1. emil-lp ◴[] No.46241875[source]
Because optimizations are not added to the PEP, but added later.