| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This is just an example. We should do the same for all the rest of the createXYZ methods in crypto, and maybe in other places as well. |
Sorry, something went wrong.
|
Yes, I think we should be doing it for the rest as well. |
Sorry, something went wrong.
|
The reason it was not inlining was with the following output: Not inlining Hash into etag because call is recursive |
Sorry, something went wrong.
|
@mscdex do you prefer if we do all of them here, or we do this into separate PRs? |
Sorry, something went wrong.
There was a problem hiding this comment.
With the understanding that this is going to be done with all the other creation functions, LGTM.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
For the record: We removed the recursive inlining restriction recently.
Sorry, something went wrong.
|
@bmeurer is this worth doing then? In which version of V8 this is going to be part of? |
Sorry, something went wrong.
|
I have ported all the createXYZ functions. |
Sorry, something went wrong.
|
I think it's worth doing for now, especially for node v8.x which may not see the version of V8 where the fixed is applied. |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Please add a quick comment explaining the optimization.
Sorry, something went wrong.
|
@mcollina I just noticed that we still disallow direct recursive inlining (as of 08bfcb293cfff2d71bcfb28fae8679d0b29a3d5c), so even though indirect recursion is handled, direct recursion is not. These changes are in V8 6.2. So for Node 8 it definitely makes sense to land this change. |
Sorry, something went wrong.
There was a problem hiding this comment.
Minor nits:
s/function/helper functions/
Also, might use more generic wording like 'These helper functions are needed because the constructors can use new, in which case V8 cannot inline the recursive constructor call' or something along those lines.
Sorry, something went wrong.
This commit increase by around 10% hot code paths that are hitting createXYZ functions. Before this change the createXYZ called the XYZ constructor without new.
|
CI before landing: https://ci.nodejs.org/job/node-test-pull-request/10523/ |
Sorry, something went wrong.
This commit increase by around 10% hot code paths that are hitting createXYZ functions. Before this change the createXYZ called the XYZ constructor without new. PR-URL: #16067 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit increase by around 10% hot code paths that are hitting createXYZ functions. Before this change the createXYZ called the XYZ constructor without new. PR-URL: nodejs/node#16067 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
This does not land cleanly on v8.x Would someone be willing to backport if it makes sense? |
Sorry, something went wrong.
assert.strictEqual(crypto.createHash, crypto.Hash);et al. throw with this change, should we backport anyway? |
Sorry, something went wrong.
|
@lpinca if it is breaking than this should likely be tagged semver-major, if not then I don't see why we shouldn't backport |
Sorry, something went wrong.
|
@MylesBorins yes exactly I'm not sure if it's a breaking change or not. |
Sorry, something went wrong.
|
setting semver-major for right now /cc @nodejs/tsc to chime in. Feel free to change tag |
Sorry, something went wrong.
|
According to our doc, this is patch. if people are calling createHash with new, probably they are doing somethig wrong. This can go in 8. Or we can bake it for a bit on 9 and then backport to 8. |
Sorry, something went wrong.
|
I'm +1 on it being semver-patch. |
Sorry, something went wrong.
This commit increase by around 10% hot code paths that are hitting createXYZ functions. Before this change the createXYZ called the XYZ constructor without new. PR-URL: nodejs#16067 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Backport in #16446 marked as blocked currently. |
Sorry, something went wrong.
|
dropping semver-major. Thinking we should let this bake in 9.x a bit first |
Sorry, something went wrong.
This commit increase by around 10% hot code paths that are hitting createXYZ functions. Before this change the createXYZ called the XYZ constructor without new. PR-URL: #16067 Backport-PR-URL: #16446 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit increase by around 10% hot code paths that are hitting createXYZ functions. Before this change the createXYZ called the XYZ constructor without new. PR-URL: #16067 Backport-PR-URL: #16446 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
| Back | FazBrowse Home | New Git URL |
This commit increase by around 10% hot code paths that are hitting
createXYZ functions. Before this change the createXYZ called the XYZ
constructor without new.
Checklist
Affected core subsystem(s)
crypto