[issue31147] a suboptimal check in list_extend()

2017-08-13 Thread Oren Milman
Oren Milman added the comment: thank you for the elaborate reply :) do you feel the same about changing the check to (Py_SIZE(self) < (self->allocated >> 1)) ? -- ___ Python tracker ___

[issue31147] a suboptimal check in list_extend()

2017-08-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm concerned that is would provide near zero benefit but would set us up for future bugs by tightly coupling two ideas that I would like to be able to reason about separately. The logic for list.extend() makes a potential overallocation, fills the list,

[issue31147] a suboptimal check in list_extend()

2017-08-12 Thread Oren Milman
Changes by Oren Milman : -- title: a mostly useless check in list_extend() -> a suboptimal check in list_extend() ___ Python tracker ___