Ad
  • Custom User Avatar

    Not really, with enough number of executions the differences in individual runs should diminish and you will see true performance difference between the solutions. That's why for small snippets of code, which are affected most by even smallest stuff your CPU can be doing in the background, you should use modules like timeit which will run your snippet 10-100 thousand times to average the result. Timeit can also set up the environment for you (like imports) and not count time for it.

  • Default User Avatar
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution