Timing Difference: insert vs. append & reverse

Istvan Albert ialbert at mailblocks.com
Mon Aug 2 10:07:14 EDT 2004


John Keeling wrote:

> I tried the test program below. My interest is to examine timing
> differences between insert vs. append & reverse for a list. 

But what you are measuring is the difference between
one particular insert (where the index is 0) and the
combination of two other builtin operators that (in this
particular case) have the same effect.

While your observation makes a good point, in the end
we should pleased not surprised when we find ways to
speed up these specific cases.

Istvan.




More information about the Python-list mailing list