How can i compare two python files' execution time????? | Sololearn: Learn to code for FREE!

+14

How can i compare two python files' execution time?????

5/3/2020 4:28:47 PM

Pavithra Kanmanirajah

6 Answers

New Answer

+5

This is what I normally do:- import time start = time.perf_counter_ns() # put you code anywhere # between "start" and "end" # and do the same for the # other file and compare. end = time.perf_counter_ns() print(end-start)

+5

+4

https://docs.python.org/3.8/library/timeit.html

+1

use multithreading in python

+1

use concept of multithreading in python

0