-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature idea: Check which function is faster #283
Comments
One more idea for this. If both timings seem to be statistically the same, then look at the number and amount of allocations. They would usually be the same then too, but if for some reason different, it might be useful to point it out. Conversely, if the two timings are different, and it's because the GC kicked in, then may not be meaningful. This would though likely not happen for the min. time. |
Ok, I think you're saying already possible (just complicated). Or at least these are the building blocks to make my proposed macro happen. For the example here: I would do:
then something. I would rather want something like:
The benefit could also be early exit, not possible for the other way. Often very obvious which is faster after just few trials. First implementation could do as above, reusing code. |
Same issue as #239 |
I use
@btime
(and hypertime) to time, looking for the minimum time.They both take some time, longer than
@time
which isn't reliable.I was thinking would it be valuable to run task A, task B, A, B, etc. to see which is faster? Or because of cache, maybe A, A, .. A, B, B, ...B, and maybe again A..., B...?
Often I don't really care about the exact minimum value, I just care which is faster since I'm optimizing, and figure it might need way fewer runs, still statistically significant.
The text was updated successfully, but these errors were encountered: