Open mambocab opened 9 years ago
One way to deal with the timing noise would be to add a "estimated timing overhead" to the end of each report. All that would be required would be running a noop through the existing timer-running infrastructure.
Though the existing timing infrastructure finds the minimum runtime. We'd want the... mean? maximum?
Current thinking on this:
partial
.noop
and print the average as an estimated timing overheadSome caveats:
partial
implementation is like.The reason the default implementation should be with partial
is because it's a much simpler API, especially if there's any setup to be done that involves stuff outside the stdlib.
With the simplification of the call_with
api, I'm leaving this until later.
I like the apparent of the current
time_this
API, at least for single-argument functions. However, I think there's a better API trying to get out.Timer
will take afunctools.partial
as an argument, but that introduces a lot of timing noise, which is probably not acceptable for this application. Thinking on it.