Skip to content

Conversation

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

@mscdexmscdex added the string_decoder Issues and PRs related to the string_decoder subsystem. label Feb 7, 2016
@bnoordhuis
Copy link
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
Copy link
ContributorAuthor

I tested on the master branch (4.8.271).

@mscdex
Copy link
ContributorAuthor

@jasnell
Copy link
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
Copy link
ContributorAuthor

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
Copy link
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.
@mscdexmscdexforce-pushed the fix-string-decoder-write-deopt branch from e58ae86 to 67edf11CompareFebruary 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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
@mscdex
Copy link
ContributorAuthor

Landed in ae244a2.

@mscdexmscdex closed this Feb 11, 2016
@mscdexmscdex 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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

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

@jasnell
Copy link
Member

SGTM

@rvagg
Copy link
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

string_decoderIssues and PRs related to the string_decoder subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@mscdex@bnoordhuis@jasnell@MylesBorins@rvagg