0

I run timeit module as follow:-

%timeit  j2j.convert(input, rules)

It returns the output as

10000 loops, best of 3: 66.3 µs per loop

What does the return statement mean?

U13-Forward
  • 69,221
  • 14
  • 89
  • 114
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
  • Also see [the `%timeit` documentation](http://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-timeit). And for [the `timeit` module](https://docs.python.org/3/library/timeit.html#basic-examples). – abarnert Jun 18 '18 at 05:03
  • If that's not enough, please explain which part of it you don't understand. – abarnert Jun 18 '18 at 05:06
  • Basically, what;s `10000` loops? what is `66.3us`? Is it the average of best of 3 execution time? – Praful Bagai Jun 18 '18 at 05:13
  • Did you read the docs? Or the answers to the linked question? – abarnert Jun 18 '18 at 05:28
  • I can answer briefly, but it's going to be less clear than in docs or an answer: It ran your statement 10000 times. It did that 3 times, and kept the best of 3 runs. The `66.3 µs per loop` means that, in that best run, the average time to execute your statement was 66.3µs—that is, the total time to execute your statement 10000 times was 663ms, but it's been nice and done the division by 10000 for you. – abarnert Jun 18 '18 at 05:29

0 Answers0