GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — string_decoder: fix performance regression by mscdex · Pull Request #5134 · nodejs/node

Conversation

@mscdex

@mscdex 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

bnoordhuis commented 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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex

mscdex commented Feb 7, 2016

Copy link
Copy Markdown
Contributor Author

I tested on the master branch (4.8.271).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex

mscdex commented Feb 7, 2016

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/1583/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Feb 10, 2016

Copy link
Copy Markdown
Member

Ok, that's fine. Still LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex
string_decoder: fix performance regression
67edf11
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
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
@mscdex
string_decoder: fix performance regression
ae244a2
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@mscdex

mscdex commented Feb 11, 2016

Copy link
Copy Markdown
Contributor Author

Landed in ae244a2.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex mscdex closed this Feb 11, 2016
@mscdex
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
@mscdex @rvagg
string_decoder: fix performance regression
25513a4
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
stefanmb pushed a commit to stefanmb/node that referenced this pull request Feb 23, 2016
@mscdex @stefanmb
string_decoder: fix performance regression
f6e84f2
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 10, 2016
Audit commits not found on v4.x #5647
Closed
@MylesBorins MylesBorins added the lts-watch-v4.x label Mar 10, 2016
@MylesBorins

MylesBorins commented Mar 10, 2016

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Mar 11, 2016

Copy link
Copy Markdown
Member

SGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rvagg

rvagg commented Mar 14, 2016

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MylesBorins pushed a commit that referenced this pull request Mar 17, 2016
@mscdex Myles Borins
string_decoder: fix performance regression
04d6d5b
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins added land-on-v4.x and removed lts-watch-v4.x labels Mar 17, 2016
MylesBorins pushed a commit that referenced this pull request Mar 21, 2016
@mscdex Myles Borins
string_decoder: fix performance regression
cc0e36f
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

string_decoder Issues and PRs related to the string_decoder subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@mscdex @bnoordhuis @jasnell @MylesBorins @rvagg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.