3 ms·
if you have a lot of them, plain dict may prove faster.
by gbog 14y ago
if you have a lot of them, plain dict may prove faster.
- thezilch 14y agoNot likely. Proof? I'd agree if you'd said "not a lot of key/values," as the setup could supersede the subsequent speedups. However, in that case, the difference is negligible, and we should do what is "pythonic."
- gbog 14y agoYes, I meant a myriad of very small dicts. In this case a plain built-in is faster.