Closed zenspider closed 2 months ago
Ever since I scratched this up I've been driving all my benchmarks via this w/ zero arg methods for clean comparisons. It's helped clean up a lot.
send
is quite a big overhead, so that should be addressed (e.g. via eval) if such a convenience method is added.
one could say the same about block activation.
I don't care how it is implement as long as it is easy to use... but as long as it is uniform over all the benchmarks it should be fine. easy enough to crib up an empty method to see what overhead looks like.
I think the send overhead is probably fine since the user would likely be measuring the results against previous results generated the same way. For super tight code, it might overwhelm the results but not most of the time.
@zenspider Thoughts about having the method take the x
param so it can do the x.times
loop? Or do you feel like that's bleeding too many details?
I have to look up Benchmark.ips EVERY time and the (ri) doco is still a PITA.
Pls consider a simple top level driver method like so: