I was trying to compare performance of two statements with timeit
, and the results are something like:
100 loops, best of 3: 100 ns per loop
100 loops, best of 3: 1.96 us per loop
But I don't know what these ns
and us
stands for, so I don't know which one is faster.
ns stands for nanoseconds. n is the regular SI prefix meaning 10-9. us means microseconds. In SI that would be µs (10-6 seconds) - the u is used because there's not a µ in ASCII, but it does look pretty similar. In your case, that means you're comparing 100×10-9 seconds against 1.96×10-6 seconds - the former is almost 20× faster.
Nanoseconds and microseconds... 10-9 and 10-6 respectively.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With