[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

Yury Selivanov report at bugs.python.org
Wed Feb 3 15:42:36 EST 2016


Yury Selivanov added the comment:

Zach, first I was going to collect some stats on this (as Serhiy also suggests).  It would be interesting to collect some stats on how many times BINARY_SUBSCR receives lists, tuples, dicts, and other types.  I'd instrument the code to collect those stats and run Python tests suite and benchmarks.

I'm pretty sure that optimizing lists (and tuples?) is a great idea.  It would also be nice to optimize [-1] lookup.  I'd also measure if we should add a fast path for dicts (PyDict_CheckExact + PyDict_GetItem).

If you have time to work on this issue, then by all means go ahead.  We'll be glad to assist you and review the patch.

----------

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


More information about the Python-bugs-list mailing list