-
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
fs: refactor to use more primordials #36196
Conversation
This comment has been minimized.
This comment has been minimized.
These changes seem to cause a consistent ~6% performance regression in at least the |
Yeah it looks like only
|
That might be coming from the change in the |
I don't know, but judging by at least these results and those from #36166 it seems that wholesale replacement of OOP constructs with these primordial functions can easily cause performance regressions, some more serious than others. I think we should be careful when making these kinds of changes. Perhaps someone with better V8 knowledge (@nodejs/v8 ?) can chime in about the reason for these performance regressions and what we might be able to do about them.... |
I think it’s probably in part because using Also, V8 before v8.0 didn’t support generating optimised code when using |
It loooks like v8 has moved away from using JS (https://github.com/v8/v8/blob/d6ead37d265d7215cf9c5f768f279e21bd170212/src/js/prologue.js#L152-L156) to C++ (https://github.com/v8/v8/blob/4b9b23521e6fd42373ebbcb20ebe03bf445494f9/src/bootstrapper.cc#L4619-L4620) to implement |
Benchmark comparing master and this PR on top of #36221:
We can see the regression is still there… |
I've Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/709/ (queued, will 404 until it starts) EDIT: |
Benchmark results:
|
If there is no objections, I'm planning on landing this later today. /cc @mscdex |
Commit Queue failed- Loading data for nodejs/node/pull/36196 ✔ Done loading data for nodejs/node/pull/36196 ----------------------------------- PR info ------------------------------------ Title fs: refactor to use more primordials (#36196) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch aduh95:fs-primordials -> nodejs:master Labels author ready, lib / src Commits 5 - fs: refactor to use more primordials - fixup! fs: refactor to use more primordials - fixup! fs: refactor to use more primordials - fixup! fs: refactor to use more primordials - fixup! fs: refactor to use more primordials Committers 1 - Antoine du Hamel PR-URL: https://github.com/nodejs/node/pull/36196 Reviewed-By: James M Snell ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/36196 Reviewed-By: James M Snell -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - fixup! fs: refactor to use more primordials ⚠ - fixup! fs: refactor to use more primordials ⚠ - fixup! fs: refactor to use more primordials ⚠ - fixup! fs: refactor to use more primordials ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2020-11-26T00:43:41Z: https://ci.nodejs.org/job/node-test-pull-request/34566/ ℹ Last Benchmark CI on 2020-11-25T14:43:15Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/709/ - Querying data for job/node-test-pull-request/34566/ ✔ Build data downloaded ✔ Last Jenkins CI successful ℹ This PR was created on Fri, 20 Nov 2020 14:36:57 GMT ✔ Approvals: 1 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/36196#pullrequestreview-535540379 -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/387516680 |
PR-URL: nodejs#36196 Reviewed-By: James M Snell <jasnell@gmail.com>
45200cc
to
8d6c2f2
Compare
Landed in 8d6c2f2 |
PR-URL: #36196 Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes