在测一个功能的实现效率,得到这么几个结果:
123 ms ± 8.32 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
59.2 ms ± 4.05 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
52.4 ns ± 0.256 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)
47.4 ns ± 0.105 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)
哪个耗时最短(效率最高)?
为什么?