-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Performance: Cache obj[key] access into #707
Conversation
Cache into a variable the object[key] value Signed-off-by: francesco <[email protected]>
it does not seem there are any improvements, or I'm misreading this? |
The problem with micro-optimization is the instability of the benchmark. The PR is correct, but the difference is negligible. Tomorrow try to run benchmark on thousands of samples (now is 100) |
@mcollina results on 250 minSamples (default is 100):
Master
|
It seems you are cutting out all the object benchmarks? I thought this impacted those. |
@mcollina minSamples 500 PR
Master
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Caching the value of
obj[key]
into a variable instead of continue access to objectPR
master
Checklist
npm run test
andnpm run benchmark
and the Code of conduct