logoalt Hacker News

emil-lptoday at 7:58 AM0 repliesview on HN

The point is that freeze could work in constant time, whereas the copying takes linear time.

Another alternative mentioned was `move`, which would create a frozen version in constant time and clear the original dict.