Skip to content

stream: inline unbuffered _write - #32886

Closed
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:stream-optimize
Closed

stream: inline unbuffered _write#32886
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:stream-optimize

Conversation

@ronag

@ronagronag commented Apr 16, 2020

Copy link
Copy Markdown
Member

A ~15% improvement for the sync case

 streams/writable-manywrites.js callback='no' writev='no' sync='no' n=2000000 1.68 % ±5.45% ±7.25% ±9.45%
streams/writable-manywrites.js callback='no' writev='no' sync='yes' n=2000000 *** 15.98 % ±3.86% ±5.14% ±6.69%
streams/writable-manywrites.js callback='no' writev='yes' sync='no' n=2000000 0.28 % ±5.36% ±7.14% ±9.30%
streams/writable-manywrites.js callback='no' writev='yes' sync='yes' n=2000000 0.89 % ±4.58% ±6.09% ±7.92%
streams/writable-manywrites.js callback='yes' writev='no' sync='no' n=2000000 -1.19 % ±4.94% ±6.58% ±8.56%
streams/writable-manywrites.js callback='yes' writev='no' sync='yes' n=2000000 *** 19.24 % ±4.17% ±5.55% ±7.23%
streams/writable-manywrites.js callback='yes' writev='yes' sync='no' n=2000000 -1.97 % ±5.91% ±7.87% ±10.24%
streams/writable-manywrites.js callback='yes' writev='yes' sync='yes' n=2000000 -0.03 % ±4.68% ±6.22% ±8.10%
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Apr 16, 2020
@ronagronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 16, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@himself65himself65 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
and should we add a comment like // inline doWrite(stream, state, false, len, chunk, encoding, cb) for better understand

@ronag

Copy link
Copy Markdown
MemberAuthor

and should we add a comment like // inline doWrite(stream, state, false, len, chunk, encoding, cb) for better understand

It's not exactly the same anymore, since some of the code that is not relevant is removed. So it might make it more confusing?

ronag added a commit that referenced this pull request Apr 18, 2020
PR-URL: #32886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@ronag

Copy link
Copy Markdown
MemberAuthor

Landed in fd10be4

@ronagronag closed this Apr 18, 2020
BethGriggs pushed a commit that referenced this pull request Apr 27, 2020
PR-URL: #32886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BethGriggsBethGriggs mentioned this pull request Apr 27, 2020
BridgeAR pushed a commit that referenced this pull request Apr 28, 2020
PR-URL: #32886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeARBridgeAR mentioned this pull request Apr 28, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@ronag@nodejs-github-bot@addaleax@lpinca@BridgeAR@himself65@targos