Skip to content

Instantly share code, notes, and snippets.

@suzaku
Created September 13, 2015 08:11
Show Gist options
  • Save suzaku/d784b810161cde64f053 to your computer and use it in GitHub Desktop.
Save suzaku/d784b810161cde64f053 to your computer and use it in GitHub Desktop.
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
@suzaku
Copy link
Author

suzaku commented Sep 13, 2015

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