←back to thread

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