Python基准测试与空速表观计时量化

2024-06-01 00:23:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我用空速来测试一些加速部分scikit-image。结果似乎包含几个重复的值,并且这些值几乎是彼此的整数倍:

--                                symmetric / normed
------------ -----------------------------------------------------------
   shape      True / True   True / False   False / True   False / False
============ ============= ============== ============== ===============
  (50, 50)      3.12±0ms     1.56±0.6ms      3.12±2ms        1.30±0ms
 (100, 100)     5.21±0ms      1.95±0ms       3.91±0ms        1.56±0ms
 (200, 200)     7.81±0ms      3.12±0ms       7.81±0ms        3.12±2ms
============ ============= ============== ============== ===============

这表明输出时间的明显量化,即我正在接近时间分辨率的极限。有什么办法可以解决这个问题,例如强制执行更多的运行?你知道吗

我的命令行是asv run -E existing -b time_greycomatrix。你知道吗


Tags: 命令行imagefalsetrue时间分辨率scikitms