-
Notifications
You must be signed in to change notification settings - Fork 2
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
Mention 2~3 ns benchmarks #1
Comments
Thank you. Good point. I'll look into it. And maybe in some kind of automation as well |
hey @asterite just a question regarding your point, in some cases like this one that compares here is the result:
the first one, is a little bit slower, so should we consider @konung maybe in these make sense both points? |
@fernandes What happens if you invert the order of the benchmark? First |
uow, now the first is the slower hahaha |
my idea is try to avoid any Now with 20/2
maybe the benchmarks should run each time changing the first execution, if the result invert, no conclusion can be made |
Hi!
Really nice project. It helps to decide what to use.
Just a note: when benchmark iteration times are around 2~3 nanoseconds then there's probably really no difference at all. You can try this by swapping the order of the benchmark blocks, you always get the last one a bit slower than the first one. I'm not sure why this happens, though. But it would be nice to clarify that "in this benchmark it makes no difference what you use because (the reason I'm explaining here)".
This is just to make sure people don't use
array[0]
instead ofarray.first
because they think it's faster. It's not.Thank you!
The text was updated successfully, but these errors were encountered: