bpo-26301: Add a fast-path for list[index] in BINARY_SUBSCR opcode#9853
bpo-26301: Add a fast-path for list[index] in BINARY_SUBSCR opcode#9853pablogsal wants to merge 1 commit intopython:masterfrom
Conversation
Since it's a micro benchmark, such result is not impressive and I'm not sure that it's worth it. I doubt that we see anything if macro benchmark level: http://pyperformance.readthedocs.io/ |
|
Indeed, this is not attractive at all. You also forgot to check for errors after |
|
@vstinner @pitrou Thanks for the review, I will, therefore, close this PR. Will still check if I see anything different in https://pyperformance.readthedocs.io/ just out of curiosity. |
|
In addition to said by @vstinner and @pitrou, you would need to benchmark also indexing non-lists: strings, tuples, dicts. I afraid that optimizing one particular case will hit performance of all other cases. Also, adding 20 new lines in the ceval loop can affect performance of other unrelated opcodes. |
Based on a path by Zach Byrne and @vstinner.
Cache information
BASELINE
PATCH
https://bugs.python.org/issue26301