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

tls: fix performance regression in convertALPNProtocols() #43250

Merged

Conversation

LiviaMedeiros
Copy link
Contributor

Refs: #43211 (comment)

isUint8Array() covers instances of Buffer
isArrayBufferView() path is cold and not worth additional check

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem. labels May 30, 2022
@LiviaMedeiros LiviaMedeiros added needs-benchmark-ci PR that need a benchmark CI run. request-ci Add this label to start a Jenkins CI on a PR. labels May 30, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 30, 2022
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented May 30, 2022

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

LGTM if benchmark shows that this fixes the regression.

@tniessen
Copy link
Member

6 % improvement, but low statistical significance:

One configuration indicates performance improvements.

@nodejs-github-bot
Copy link
Collaborator

@tniessen
Copy link
Member

Second benchmark CI, more iterations: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1147/

No significant change

Raw output shows 1-2 % improvement.

@tniessen
Copy link
Member

Third benchmark CI, even more iterations than the second run: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1148/

small improvement with high confidence

@iamshabell
Copy link

LGTM!

`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: nodejs#43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
@LiviaMedeiros
Copy link
Contributor Author

@tniessen Thanks a lot for benchmarking!

@LiviaMedeiros LiviaMedeiros merged commit 386c7e1 into nodejs:master Jun 3, 2022
@LiviaMedeiros
Copy link
Contributor Author

Landed in 386c7e1

italojs pushed a commit to italojs/node that referenced this pull request Jun 6, 2022
`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: nodejs#43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
danielleadams pushed a commit that referenced this pull request Jun 11, 2022
`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: #43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
@danielleadams danielleadams mentioned this pull request Jun 11, 2022
danielleadams pushed a commit that referenced this pull request Jun 13, 2022
`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: #43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
targos pushed a commit that referenced this pull request Jul 12, 2022
`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: #43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: #43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
`isUint8Array()` covers instances of `Buffer`
`isArrayBufferView()` path is cold and not worth additional check

PR-URL: nodejs/node#43250
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants