python time.time()和time.perf_counter()在基于窗口,ubuntu和基于Web的解释器中的结果不同。是病毒引起的吗?

import time

def compare_t_vs_p(r):
    st_p = time.perf_counter()
    st_t = time.time()
    for i in range(r):
        pass

    p = time.perf_counter() - st_p
    t = time.time() - st_t

    return print( 'perf_counter: %s \ntime: %s' % ( p, t))

窗口10中的结果:

>>> compare_t_vs_p(10)
perf_counter: 1.7000000021027972e-06
time: 0.0

>>> compare_t_vs_p(1000)
perf_counter: 1.7099999993774873e-05
time: 0.0

>>> compare_t_vs_p(100)
perf_counter: 2.3999999996249244e-06
time: 0.0

>>> compare_t_vs_p(10000)
perf_counter: 0.00017479999999636675
time: 0.0

>>> compare_t_vs_p(100000)
perf_counter: 0.0017023999999992157
time: 0.0020096302032470703

但是在Ubuntu中:

>>> compare_t_vs_p(10)
perf_counter: 5.400000006261507e-06
time: 5.4836273193359375e-06

>>> compare_t_vs_p(10000000)
perf_counter: 0.15428090000000338
time: 0.1542835235595703

>>> compare_t_vs_p(10000000)
perf_counter: 0.15246989999999983
time: 0.15247201919555664

>>> compare_t_vs_p(10)
perf_counter: 7.50000000948603e-06
time: 7.3909759521484375e-06

>>> compare_t_vs_p(100)
perf_counter: 2.5300000004335743e-05
time: 2.5510787963867188e-05

>>> compare_t_vs_p(1000)
perf_counter: 3.3300000012559394e-05
time: 3.337860107421875e-05

是什么导致这种差异?