buffer: consolidate encoding parsing#29217
Merged
mscdex merged 2 commits intonodejs:masterfrom Aug 28, 2019
Merged
Conversation
Collaborator
Member
|
@nodejs/buffer This could use some reviews. |
Collaborator
bnoordhuis
approved these changes
Aug 22, 2019
Member
bnoordhuis
left a comment
There was a problem hiding this comment.
Nice work, some impressive speedups!
lib/buffer.js
Outdated
Member
There was a problem hiding this comment.
Maybe add a comment that for performance reasons it's imperative that all the entries have the same shape / hidden map? (I.e., users of an ops object shouldn't go poly- or megamorphic.)
This comment has been minimized.
This comment has been minimized.
Collaborator
addaleax
approved these changes
Aug 25, 2019
cb09531 to
9c7149a
Compare
Collaborator
PR-URL: nodejs#29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
9c7149a to
5dc5cfb
Compare
BridgeAR
pushed a commit
that referenced
this pull request
Sep 3, 2019
PR-URL: #29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
BridgeAR
pushed a commit
that referenced
this pull request
Sep 3, 2019
PR-URL: #29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Merged
BridgeAR
pushed a commit
that referenced
this pull request
Sep 4, 2019
PR-URL: #29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
BridgeAR
pushed a commit
that referenced
this pull request
Sep 4, 2019
PR-URL: #29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
tniessen
added a commit
to tniessen/node
that referenced
this pull request
Oct 16, 2023
The assignment to the encoding variable has no effect. Refs: nodejs#29217
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
The assignment to the encoding variable has no effect. Refs: nodejs#29217 PR-URL: nodejs#50199 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This consolidates encoding parsing for
bufferat both the JS and C++ levels (onlyfill()still parses the encoding twice). Doing so not only cleans things up but also improves performance in some cases.Various relevant benchmark results:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes