-
Notifications
You must be signed in to change notification settings - Fork 0
Q & A
Yes, but the recursive call must be altered. If
foois recursive, then the recursive call must be tofoo.__wrapped__to prevent the timing code from being executed recursively as well.
Very little. In fact, the measured times should be changed minimally by the timing code as operations that take longer, like those relating to
call_callable_args, are excluded from the measured times. However, some operations likeTimer.plot()andTimer.best_fit_curve()are going to be more intensive.
perf_counter()is used internally and according to PEP 564, its resolution is system dependent. On Linux, it is accurate to about82 nsand on Windows, it is accurate to about100 ns.
No. As mentioned above,
perf_counter()is used internally and it measures time system-wide. This should result in more real-world measurements.