Skip to content

timers: refactor to use optional chaining - #36767

Closed
Lxxyx wants to merge 1 commit into
nodejs:masterfrom
Lxxyx:timers-refactor-use-optional-chaining
Closed

timers: refactor to use optional chaining#36767
Lxxyx wants to merge 1 commit into
nodejs:masterfrom
Lxxyx:timers-refactor-use-optional-chaining

Conversation

@Lxxyx

@LxxyxLxxyx commented Jan 4, 2021

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. label Jan 4, 2021
@aduh95aduh95 added the needs-benchmark-ci PR that need a benchmark CI run. label Jan 4, 2021
@aduh95

Copy link
Copy Markdown
Contributor

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/874/console

No regressions or improvements
 confidence improvement accuracy (*) (**) (***)
timers/timers-cancel-pooled.js n=5000000 -0.96 % ±9.53% ±12.68% ±16.51%
timers/timers-cancel-unpooled.js direction='end' n=1000000 4.08 % ±7.54% ±10.04% ±13.07%
timers/timers-cancel-unpooled.js direction='start' n=1000000 -2.81 % ±5.86% ±7.80% ±10.16%
Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case there are 3 comparisons, you can thus
expect the following amount of false-positive results:
0.15 false positives, when considering a 5% risk acceptance (*, **, ***),
0.03 false positives, when considering a 1% risk acceptance (**, ***),
0.00 false positives, when considering a 0.1% risk acceptance (***)

@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. and removed needs-benchmark-ci PR that need a benchmark CI run. labels Jan 5, 2021
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 5, 2021
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Lxxyx
Lxxyxforce-pushed the timers-refactor-use-optional-chaining branch from fbf05e0 to 738759aCompareJanuary 8, 2021 11:33
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

jasnell pushed a commit that referenced this pull request Jan 9, 2021
PR-URL: #36767
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in d8f535b

@jasnelljasnell closed this Jan 9, 2021
@Lxxyx
Lxxyx deleted the timers-refactor-use-optional-chaining branch January 11, 2021 10:43
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
PR-URL: #36767
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danielleadamsdanielleadams mentioned this pull request Jan 12, 2021
@mcollina

Copy link
Copy Markdown
Member

As part of #37937, I tracked down a regression introduced by this one.

With optional chaining:

Screenshot 2021-04-15 at 12 07 40

Without optional chaining:

Screenshot 2021-04-15 at 12 07 51

targos pushed a commit that referenced this pull request May 25, 2021
PR-URL: #36767
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Lxxyx@aduh95@nodejs-github-bot@jasnell@mcollina@targos