Don't Use time.time() To Measure Execution Time
The ππΆπΊπ²() method from the time library is frequently used to measure the execution time.
However, ππΆπΊπ²() is not meant for timing your code. Rather, its actual purpose is to tell the current time. This, at many times, compromises the accuracy of measuring the exact run time.
The correct approach is to use π½π²πΏπ³_π°πΌππ»ππ²πΏ(), which deals with relative time. Thus, it is considered the most accurate way to time your code.
I like to explore, experiment and write about data science concepts and tools. You could connect with me on LinkedIn.