-
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
stream: use bit fields for construct/destroy #50408
stream: use bit fields for construct/destroy #50408
Conversation
Review requested:
|
6a5c0d6
to
3bf4eaf
Compare
3bf4eaf
to
02e3f43
Compare
02e3f43
to
74712a7
Compare
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
const kObjectMode = 1 << 0; | ||
const kErrorEmitted = 1 << 1; | ||
const kAutoDestroy = 1 << 2; | ||
const kEmitClose = 1 << 3; | ||
const kDestroyed = 1 << 4; | ||
const kClosed = 1 << 5; | ||
const kCloseEmitted = 1 << 6; | ||
const kErrored = 1 << 7; | ||
const kConstructed = 1 << 8; |
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.
How can we enforce that readable/writable stream will not have a bit state with the same position?
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.
Not sure. Suggestions?
74712a7
to
763eaa1
Compare
763eaa1
to
cea0fb4
Compare
@ronag If the motivation of this change is performance, can you share the benchmarks? |
There is a CI benchmark |
Landed in 4c3dde9 |
PR-URL: nodejs#50408 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: #50408 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: #50408 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Raz Luvaton <rluvaton@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
No description provided.