From 2d962e25ccfc0d4cab145b62d8333c6cc73d7107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Louren=C3=A7o?= Date: Mon, 9 Oct 2023 23:35:06 -0300 Subject: [PATCH 1/5] doc: add ReflectConstruct to known perf issues --- doc/contributing/primordials.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributing/primordials.md b/doc/contributing/primordials.md index 5570a17f6bc5bc..32a3b628859bba 100644 --- a/doc/contributing/primordials.md +++ b/doc/contributing/primordials.md @@ -122,6 +122,7 @@ performance of code in Node.js. * `SafePromiseAny` * `SafePromiseRace` * `SafePromisePrototypeFinally`: use `try {} finally {}` block instead. +* `ReflectConstruct`: see linked PRs to [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) to learn faster methods. In general, when sending or reviewing a PR that makes changes in a hot code path, use extra caution and run extensive benchmarks. From 6551eedc2f55fab23bf03377a61c34f24bb824ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Louren=C3=A7o?= Date: Tue, 10 Oct 2023 00:08:18 -0300 Subject: [PATCH 2/5] fixup! doc: add ReflectConstruct to known perf issues --- doc/contributing/primordials.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/contributing/primordials.md b/doc/contributing/primordials.md index 32a3b628859bba..c724d417a27860 100644 --- a/doc/contributing/primordials.md +++ b/doc/contributing/primordials.md @@ -122,7 +122,8 @@ performance of code in Node.js. * `SafePromiseAny` * `SafePromiseRace` * `SafePromisePrototypeFinally`: use `try {} finally {}` block instead. -* `ReflectConstruct`: see linked PRs to [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) to learn faster methods. +* `ReflectConstruct`: see linked PRs to [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) + to learn faster methods. In general, when sending or reviewing a PR that makes changes in a hot code path, use extra caution and run extensive benchmarks. From 614c67b5e61f578d8bebcdc395ab00078d4101b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Louren=C3=A7o?= Date: Wed, 18 Oct 2023 11:32:33 -0300 Subject: [PATCH 3/5] fixup! doc: add ReflectConstruct to known perf issues Co-authored-by: Uzlopak --- doc/contributing/primordials.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/contributing/primordials.md b/doc/contributing/primordials.md index c724d417a27860..03094026b664df 100644 --- a/doc/contributing/primordials.md +++ b/doc/contributing/primordials.md @@ -122,8 +122,9 @@ performance of code in Node.js. * `SafePromiseAny` * `SafePromiseRace` * `SafePromisePrototypeFinally`: use `try {} finally {}` block instead. -* `ReflectConstruct`: see linked PRs to [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) - to learn faster methods. +* `ReflectConstruct`: Also affects `Reflect.construct`. + `ReflectConstruct` creates new types of classes inside functions. + Instead create a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) In general, when sending or reviewing a PR that makes changes in a hot code path, use extra caution and run extensive benchmarks. From f13cac8d3d9582b07f1f31ccfe0fee0890cdedad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Louren=C3=A7o?= Date: Wed, 18 Oct 2023 12:34:36 -0300 Subject: [PATCH 4/5] fixup! doc: add ReflectConstruct to known perf issues Co-authored-by: Antoine du Hamel --- doc/contributing/primordials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contributing/primordials.md b/doc/contributing/primordials.md index 03094026b664df..78f9f79597e1b3 100644 --- a/doc/contributing/primordials.md +++ b/doc/contributing/primordials.md @@ -124,7 +124,7 @@ performance of code in Node.js. * `SafePromisePrototypeFinally`: use `try {} finally {}` block instead. * `ReflectConstruct`: Also affects `Reflect.construct`. `ReflectConstruct` creates new types of classes inside functions. - Instead create a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) + Instead consider creating a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) In general, when sending or reviewing a PR that makes changes in a hot code path, use extra caution and run extensive benchmarks. From b6e6d62072cb96f1bddd79556152d453480449eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Louren=C3=A7o?= Date: Wed, 18 Oct 2023 12:56:45 -0300 Subject: [PATCH 5/5] fixup! doc: add ReflectConstruct to known perf issues --- doc/contributing/primordials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contributing/primordials.md b/doc/contributing/primordials.md index 78f9f79597e1b3..b763c88880f94c 100644 --- a/doc/contributing/primordials.md +++ b/doc/contributing/primordials.md @@ -124,7 +124,7 @@ performance of code in Node.js. * `SafePromisePrototypeFinally`: use `try {} finally {}` block instead. * `ReflectConstruct`: Also affects `Reflect.construct`. `ReflectConstruct` creates new types of classes inside functions. - Instead consider creating a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109) + Instead consider creating a shared class. See [nodejs/performance#109](https://github.com/nodejs/performance/issues/109). In general, when sending or reviewing a PR that makes changes in a hot code path, use extra caution and run extensive benchmarks.