Created
September 13, 2015 08:11
-
-
Save suzaku/d784b810161cde64f053 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [74]: timeit.timeit(stmt='del dll[10000]', setup='from collections import deque;dll = deque(range(10**5))', number=100) | |
Out[74]: 0.002535041014198214 | |
In [75]: timeit.timeit(stmt='del l[10000]', setup='l = list(range(10**5))', number=100) | |
Out[75]: 0.006009762000758201 |
0.943889683985617 > 0.0009256399935111403
and
0.006009762000758201 > 0.002535041014198214
What's wrong?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python 3.4.3 (default, Jul 26 2015, 16:49:00)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin