4 ms·
That's because Python 2 has a special case for lists[1]. This does not exist in Python 3[2] (and therefore neither does the performance difference). [1] https:
by pyre 11y ago
That's because Python 2 has a special case for lists[1]. This does not exist in Python 3[2] (and therefore neither does the performance difference).
[1] https://github.com/python/cpython/blob/2.7/Python/ceval.c#L1521-L1545 https://github.com/python/cpython/blob/2.7/Python/ceval.c#L1...
[2] https://github.com/python/cpython/blob/master/Python/ceval.c#L1591-L1601 https://github.com/python/cpython/blob/master/Python/ceval.c...
- Redoubts 11y agoIt looks like list access got slower as a result though.