• Stefan Behnel's avatar
    Increase number of items for which list.extend([...]) is optimised.... · 5b6497c8
    Stefan Behnel authored
    Increase number of items for which list.extend([...]) is optimised. Benchmarking shows that append() is still faster for 8 items (on an empty list) than extend().
    This limit could be increased for larger lists (which grow by a larger amount), but if we have to settle on one value then 8 is good enough, as we can expect literal item lists to be rather short.
    5b6497c8
list.pyx 7.06 KB