3 ms·
The new dict does not come with a performance hit, let alone a significant one. It’s much more memory efficient and generally slightly faster.
by lvh 7y ago
The new dict does not come with a performance hit, let alone a significant one. It’s much more memory efficient and generally slightly faster.
- svnpenn 7y agopretty strong evidence to the contrary https://apps.dtic.mil/dtic/tr/fulltext/u2/a627127.pdf https://apps.dtic.mil/dtic/tr/fulltext/u2/a627127.pdf do you have any references to back your claim that its actually faster?
- joshuamorton 7y agohttps://morepypy.blogspot.com/2015/01/faster-more-memory-efficient-and-more.html https://morepypy.blogspot.com/2015/01/faster-more-memory-eff... The new python dict implementation is benchmarked as faster in both microbenchmarks and in practice for almost all real-world workloads. Note that this isn't a sorted map, like C++'s "Ordered Map", but an Ordered map. C++ get's the name wrong. Items aren't ordered by key comparison, but ordered by insertion time.
- svnpenn 7y agoGood link, thanks