update is 2 times slower than normal assignment (see https://gist.github.com/sargo/8021117), in this case you updates all keys in dict so you can assign new dict instead of updating old one.