3 ms·
The Python dictionary implementation is among the most optimized on the planet. Given that Python uses dictionaries for almost everything, very close attention
by jnwatson 8y ago
The Python dictionary implementation is among the most optimized on the planet. Given that Python uses dictionaries for almost everything, very close attention is paid to dictionary performance.
- benekastah 8y agoThat doesn't automatically mean that dictionaries are just as fast with hundreds of thousands or millions of keys. I don't know one way or the other, but it's conceivable that performance could degrade somewhat with large numbers of keys.