FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

string_decoder: fix performance regression by mscdex · Pull Request #5134 · nodejs/node · GitHub

/ node Public

string_decoder: fix performance regression - #5134

Closed
mscdex wants to merge 1 commit into
nodejs:masterfrom
mscdex:fix-string-decoder-write-deopt
Closed

string_decoder: fix performance regression#5134
mscdex wants to merge 1 commit into
nodejs:masterfrom
mscdex:fix-string-decoder-write-deopt

Conversation

mscdex commented Feb 7, 2016

Copy link
Copy Markdown
Contributor

This commit reverts the const usage introduced by 68a6abc because v8 currently cannot optimize functions that contain these uses of const (unsupported phi use of const variable). The performance difference in this case can be up to ~130% for non-ascii/binary string encodings.

mscdex added the string_decoder Issues and PRs related to the string_decoder subsystem. label Feb 7, 2016

Copy link
Copy Markdown
Member

I'd split the revert and the optimization into separate commits but otherwise LGTM.

I'm kind of surprised V8 balks at it. Was that with 4.6 or 4.8?

mscdex commented Feb 7, 2016

Copy link
Copy Markdown
Contributor Author

I tested on the master branch (4.8.271).

mscdex commented Feb 7, 2016

Copy link
Copy Markdown
Contributor Author

jasnell commented Feb 10, 2016

Copy link
Copy Markdown
Member

this is a bit unfortunate but LGTM. One suggestion tho: it would be good to add some code comments that indicates what was reverted and why (with a reference to the V8 version). That would allow someone to come back later and revisit.

mscdex commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

I'm not sure that adding code comments in this particular situation would be very useful and/or feasible considering this is a much more general issue that can apply almost anywhere in the code base.

jasnell commented Feb 10, 2016

Copy link
Copy Markdown
Member

Ok, that's fine. Still LGTM

This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.
mscdex force-pushed the fix-string-decoder-write-deopt branch from e58ae86 to 67edf11 Compare February 11, 2016 15:40
mscdex added a commit that referenced this pull request Feb 11, 2016
This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: #5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>

mscdex commented Feb 11, 2016

Copy link
Copy Markdown
Contributor Author

Landed in ae244a2.

mscdex closed this Feb 11, 2016
mscdex deleted the fix-string-decoder-write-deopt branch February 11, 2016 15:45
rvagg pushed a commit that referenced this pull request Feb 15, 2016
This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: #5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
stefanmb pushed a commit to stefanmb/node that referenced this pull request Feb 23, 2016
This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: nodejs#5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>

Copy link
Copy Markdown
Contributor

As 68a6abc landed on LTS I think this should likely as well. Thoughts?

jasnell commented Mar 11, 2016

Copy link
Copy Markdown
Member

SGTM

rvagg commented Mar 14, 2016

Copy link
Copy Markdown
Member

lgtm, very minor change, (near) zero edge-case potential

MylesBorins pushed a commit that referenced this pull request Mar 17, 2016
This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: #5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 21, 2016
This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: #5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@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

Labels

string_decoder Issues and PRs related to the string_decoder subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL