-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list和tuple的遍历速度问题 #5
Comments
实际测试可以发现,你的理解应该是对的 |
yes,your're right |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In [4]:
%timeit for row in lst: list(row)
100 loops, best of 3: 4.12 ms per loop
In [5]:
%timeit for row in tup: tuple(row)
100 loops, best of 3: 2.07 ms per loop
这个地方有个疑问,我理解的话,这里差距的产生和list(row)与tuple(row)的速度有关吧?实际遍历的速度应该是差不多吧
The text was updated successfully, but these errors were encountered: