Tech IndustryDec 2, 2023
MetaUkYH48

Python dictionary

How do I measure the performance of a dict? Is its too big, what do I do?

Datadog siemdog Dec 2, 2023

What operation do you want to measure?

Instacart ogoajjrofo Dec 2, 2023

You won't have this problem

Patreon creat0rs Dec 2, 2023

do you want to account for when it resizes?

Meta UkYH48 OP Dec 2, 2023

Yes when a hot array is used in conjunction

ex-Roblox Broblox Dec 2, 2023

It's measured by Big Dict Energy. In other words, TC or GTFO

New
🇹🇼🇭🇰 ∉ 🇨🇳 Dec 2, 2023

If you’re worrying about this, you’re probably using the wrong language in the first place

Google isoiec9899 Dec 2, 2023

Quick hack: use a third party library with a faster dict implementation; a quick search in pypi identified microdict, but I am sure there are others. Long term solution: rewrite in a language with better performance (and note that literally almost any other popular language is much faster than Python).

Zillow Group rich b pls Dec 2, 2023

Oh yeah microdict, pyC hode, and pyTinyWiener are all great

Instacart ogoajjrofo Dec 3, 2023

When you get a third party involved, you need to use something like bigdict to compensate