码迷,mamicode.com
首页 > 其他好文 > 详细

%timeit的使用

时间:2020-01-20 22:57:34      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:com   span   mic   list   color   alt   image   The   val   

 

%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的使用

标签:com   span   mic   list   color   alt   image   The   val   

原文地址:https://www.cnblogs.com/wqbin/p/12219449.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!