Can you explain why `[:]` is faster for small list (10 elements) but `list()` is faster for larger list (100000 elements). ~$ python -S -mtimeit -s "a = list(range(10))" "a[:]" 1000000 loops, best of 3: 0.198 usec per…
Can you explain why `[:]` is faster for small list (10 elements) but `list()` is faster for larger list (100000 elements). ~$ python -S -mtimeit -s "a = list(range(10))" "a[:]" 1000000 loops, best of 3: 0.198 usec per…