Skip to content
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: improve read() performance further #29077

Closed
wants to merge 1 commit into from

Conversation

@mscdex
Copy link
Contributor

commented Aug 10, 2019

Results:

                                                        confidence improvement accuracy (*)    (**)   (***)
 streams/readable-unevenread.js n=1000                        ***      7.38 %       ±1.31%  ±1.75%  ±2.27%
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@nodejs-github-bot

This comment has been minimized.

@Trott
Trott approved these changes Aug 10, 2019
@ZYSzys
ZYSzys approved these changes Aug 10, 2019
const slice = data.slice(0, n);
this.head.data = data.slice(n);
return slice;
} else if (n === data.length) {

This comment has been minimized.

Copy link
@lpinca

lpinca Aug 11, 2019

Member
Suggested change
} else if (n === data.length) {
}
if (n === data.length) {

There is a return statement in the previous if branch so I wonder if we can remove the else branch.

@mscdex mscdex force-pushed the mscdex:streams-readable-perf3 branch from 0597bda to 793ad82 Aug 11, 2019

@lpinca
lpinca approved these changes Aug 11, 2019
@nodejs-github-bot

This comment has been minimized.

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Landed in 382f84a

@Trott Trott closed this Aug 12, 2019

Trott added a commit to Trott/io.js that referenced this pull request Aug 12, 2019
stream: improve read() performance further
PR-URL: nodejs#29077
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

@mscdex mscdex deleted the mscdex:streams-readable-perf3 branch Aug 13, 2019

targos added a commit that referenced this pull request Aug 19, 2019
stream: improve read() performance further
PR-URL: #29077
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos added a commit that referenced this pull request Aug 19, 2019
stream: improve read() performance further
PR-URL: #29077
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targos targos referenced this pull request Aug 19, 2019
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
stream: improve read() performance further
PR-URL: nodejs#29077
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
stream: improve read() performance further
PR-URL: nodejs#29077
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.