Percentage or Ratio using two values in nano seconds

19 Views Asked by At

I am running two different python code, one using a for loop and the other numpy library in python and I have timed it using %timeit function, yet I don't understand how to convert the two-time values into a percentage or ratio. This is the direct output from each test.

First time
$15.4 µs ± 26.9 ns$ per loop (mean ± std. dev. of 7 runs, 100000 loops each)
Second time
$9.07 µs ± 570 ns$ per loop (mean ± std. dev. of 7 runs, 100000 loops each)

The worst part is, I do not really know which one is "faster" perse, technically the second time should? I also would like to understand how to put this into a form say percentage or ratio that is easier to understand and would appreciate your help.

1

There are 1 best solutions below

1
On BEST ANSWER

Just plot them. What's the problem?

enter image description here