lib: remove internal util._extends() usage#25105
lib: remove internal util._extends() usage#25105BridgeAR wants to merge 3 commits intonodejs:masterfrom
util._extends() usage#25105Conversation
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code.
|
Why is |
|
@mscdex please have a look at my comment here https://bugs.chromium.org/p/v8/issues/detail?id=7611#c27. There is a weird cliff from 19 to 20 properties when running the benchmark for the first time. The average is definitely going to be faster. |
jasnell
left a comment
There was a problem hiding this comment.
Definitely think this is the right way to go but this definitely should not be backported to older Node.js versions where the same performance improvements haven't been made in V8.
@bmeurer ... any insights on the speed of the > 20 case?
|
AIX failure on CI reported at #25047. Linux container failure reported at #25070. Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/19660/ ✔️ |
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: nodejs#25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
Landed in d4c91f2 |
|
This doesn't land cleanly on v11.x, would someone be willing to backport? |
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: nodejs#25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: #25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: #25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: nodejs#25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: nodejs#25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This removes all internal calls to the deprecated
_extends()function. It is slower than
Object.assign()and the object spreadnotation since V8 6.8 and using the spread notation often also
results in shorter code.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes