[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

Yury Selivanov report at bugs.python.org
Wed Jun 24 17:14:47 CEST 2015


Yury Selivanov added the comment:

> I would prefer do not repeat the code, but I afraid this can affect the performance, and the performance of PyDict_GetItem is critical for Python.

Static function calls like that one will most likely be inlined by the compiler... But if you don't want to rely on that, maybe we can use a macro to avoid code duplication?

----------
nosy: +yselivanov

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24483>
_______________________________________


More information about the Python-bugs-list mailing list