%timeit的使用
Posted wqbin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了%timeit的使用相关的知识,希望对你有一定的参考价值。
%timeit
# Insert 100,000 values at the front of the list (index=0) c0 = [] t_insert = %timeit -o -n1000 -r100 c0.insert(0, ‘a‘) # Append 100,000 values at the end of the list c1 = [] t_append = %timeit -o -n1000 -r100 c1.append(‘a‘)
以上是关于%timeit的使用的主要内容,如果未能解决你的问题,请参考以下文章