-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
buffer: improve performance caused by primordials #30235
Conversation
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Fixes: nodejs#29766 Refs: nodejs/code-and-learn#97 Refs: nodejs#29633
lib/buffer.js
Outdated
@@ -21,7 +21,8 @@ | |||
|
|||
'use strict'; | |||
|
|||
const { Math, Object } = primordials; | |||
const { Object: { defineProperties, defineProperty, setPrototypeOf, create } } = primordials; |
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.
Did you run make lint
? It would usually complain about a line longer than 80 characters.
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.
Good afternoon 😃
Oh what a quick feedback!
Thank you
I'll fix it when I'm back home.
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.
One more thing to ask for help, what's the correct way to do prettify
? Normally I have prettier
set up with eslint
, but I didn't find similar in the Makefile
.
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.
make lint-js-fix
:)
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.
Oh I mean, for the max-len
rule, the eslint --fix
cannot help.
So I have to correct it by myself, right?
61292fa
to
0a1d464
Compare
I think I also need to include a
|
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 % one nit in comments.
ba61692
to
d04e6d8
Compare
Dear all reviewers, I saw the several builds fails in Jenkins, and one build
Do you think it's because of my change or the job is not stable (ignore it / re-trigger it)? |
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Refs: #29766 Refs: nodejs/code-and-learn#97 Refs: #29633 PR-URL: #30235 Refs: #29766 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Landed in 22799be. Thanks for the contribution! 🎉 (If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.) |
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Refs: #29766 Refs: nodejs/code-and-learn#97 Refs: #29633 PR-URL: #30235 Refs: #29766 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Refs: #29766 Refs: nodejs/code-and-learn#97 Refs: #29633 PR-URL: #30235 Refs: #29766 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Refs: #29766 Refs: nodejs/code-and-learn#97 Refs: #29633 PR-URL: #30235 Refs: #29766 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Refs: #29766 Refs: nodejs/code-and-learn#97 Refs: #29633 PR-URL: #30235 Refs: #29766 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This is my first PR, and it's based on the code-and-learn guidances This restore some performance after introducing primordialias. Refs: #29766 Refs: nodejs/code-and-learn#97 Refs: #29633 PR-URL: #30235 Refs: #29766 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This is my first try, and it's based on the code-and-learn guidances
This restore some performance after introducing primordialias.
Benchmark compared with
master
version using the methods mentioned herePerf Comparison
Refs: #29766
Refs: nodejs/code-and-learn#97
Refs: #29633
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes