-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
string_decoder: fix performance regression #5134
Conversation
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? |
I tested on the master branch (4.8.271). |
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. |
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. |
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.
e58ae86
to
67edf11
Compare
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>
Landed in 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 <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
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>
As 68a6abc landed on LTS I think this should likely as well. Thoughts? |
SGTM |
lgtm, very minor change, (near) zero edge-case potential |
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 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 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.