-
Notifications
You must be signed in to change notification settings - Fork 30k
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
benchmark: convert var to es6 const, let #12886
Conversation
Converted var variable to es6 const and let to maintain consistency with other benchmark files. Also clean up the types array to make the files more succinct.
benchmark/arrays/var-int.js
Outdated
var arr = new clazz(n * 1e6); | ||
for (var i = 0; i < 10; ++i) { | ||
let arr = new clazz(n * 1e6); | ||
for (let i = 0; i < 10; ++i) { |
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.
We don't use let
in the benchmarks, and let
causes a noticeable performance deficit with current V8.
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.
@sebasmurphy wait with the let
s a month or two until we activate TurboFan and Ignition nodejs/CTC#99
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.
1. Revert the let
s
2. show there is no performance regression - benchmark guide
benchmark/arrays/zero-int.js
Outdated
|
||
bench.start(); | ||
var arr = new clazz(n * 1e6); | ||
for (var i = 0; i < 10; ++i) { | ||
for (let i = 0; i < 10; ++i) { |
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.
Forgot the last one 😉
@sebasmurphy we forgot to say thank you. |
Thanks @refack. Still need to do the performance comparison. |
I have no issues with the code itself, but just want to provide the context. Historically, we have avoided making such changes in the benchmarks in order to allow us to keep running the benchmarks against older versions of Node.js that do not have these constructs (think, 0.10 and 0.12). That said, now that all of those older versions are no longer supported, it should be perfectly fine to re-baseline the benchmarks on whatever is supported by Node.js 4.x. (or, moving forward, the oldest release line in LTS at any given point in time) |
Ref: #13729 |
Is this stalled or blocked on @refack's re-review? |
It was mostly blocked till TF&I landed (#13729). So in my POV this could move forward. Pre-land CI: https://ci.nodejs.org/job/node-test-pull-request/9713/ |
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.
TF&I perturbed everything anyway, so it's a good opportunity to improve the code.
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.
Change itself LGTM, even though the refactoring of the type
array blows up the diff size.
a trick @Trott tought me: add |
Converted var variable to es6 const to maintain consistency with other benchmark files. Also clean up the types array to make the files more succinct. PR-URL: #12886 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Landed in c49dcb3 |
Converted var variable to es6 const to maintain consistency with other benchmark files. Also clean up the types array to make the files more succinct. PR-URL: #12886 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Converted var variable to es6 const to maintain consistency with other benchmark files. Also clean up the types array to make the files more succinct. PR-URL: #12886 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Converted var variable to es6 const to maintain consistency with other benchmark files. Also clean up the types array to make the files more succinct. PR-URL: #12886 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Converted var variable to es6 const and let to maintain
consistency with other benchmark files. Also clean up
the types array to make the files more succinct.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
benchmark