[issue38278] Need a more efficient way to perform dict.get(key, default)

STINNER Victor report at bugs.python.org
Wed Sep 25 10:56:19 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

I also suggest you to not focus on such micro-benchmarks. It's not relevant to make a whole application faster. Use PyPy if you care about performances. PyPy has a very efficient implementation for dictionary and it's JIT compiler can go way further than CPython. In some cases, PyPy can even replace hash table lookup with array access:
https://twitter.com/cfbolz/status/1175493837516627968

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38278>
_______________________________________


More information about the Python-bugs-list mailing list