Commit bd79c37
timers: clean up for readability
Remove micro-optimizations that no longer yield any benefits,
restructure timers & immediates to be a bit more straightforward.
Adjust timers benchmarks to run long enough to offer meaningful data.
PR-URL: #17279
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>1 parent 0db1f87 commit bd79c37Copy full SHA for bd79c37
File tree
Expand file treeCollapse file tree
10 files changed
+148
-174
lines changedOpen diff view settings
Filter options
- benchmark/timers
- lib
Expand file treeCollapse file tree
10 files changed
+148
-174
lines changedOpen diff view settings
Collapse file
benchmark/timers/immediate.js
Copy file name to clipboardExpand all lines: benchmark/timers/immediate.js+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | 7 | |
8 | 8 | |
| ||
88 | 88 | |
89 | 89 | |
90 | 90 | |
| 91 | + |
91 | 92 | |
92 | 93 | |
93 | 94 | |
| ||
101 | 102 | |
102 | 103 | |
103 | 104 | |
| 105 | + |
104 | 106 | |
105 | 107 | |
106 | 108 | |
|
Collapse file
benchmark/timers/set-immediate-breadth-args.js
Copy file name to clipboardExpand all lines: benchmark/timers/set-immediate-breadth-args.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
22 | | - |
| 22 | + |
23 | 23 | |
24 | | - |
| 24 | + |
25 | 25 | |
26 | 26 | |
27 | 27 | |
|
Collapse file
benchmark/timers/set-immediate-depth-args.js
Copy file name to clipboardExpand all lines: benchmark/timers/set-immediate-depth-args.js+7-7Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | 7 | |
8 | 8 | |
| ||
15 | 15 | |
16 | 16 | |
17 | 17 | |
18 | | - |
| 18 | + |
19 | 19 | |
20 | | - |
| 20 | + |
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | 27 | |
28 | | - |
| 28 | + |
29 | 29 | |
30 | | - |
| 30 | + |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | 37 | |
38 | | - |
| 38 | + |
39 | 39 | |
40 | | - |
| 40 | + |
41 | 41 | |
42 | 42 | |
43 | 43 | |
|
Collapse file
benchmark/timers/timers-breadth.js
Copy file name to clipboardExpand all lines: benchmark/timers/timers-breadth.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | 7 | |
8 | 8 | |
|
Collapse file
benchmark/timers/timers-cancel-pooled.js
Copy file name to clipboardExpand all lines: benchmark/timers/timers-cancel-pooled.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | | - |
| 27 | + |
28 | 28 | |
29 | 29 | |
30 | 30 | |
|
Collapse file
benchmark/timers/timers-cancel-unpooled.js
Copy file name to clipboardExpand all lines: benchmark/timers/timers-cancel-unpooled.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
| 21 | + |
22 | 22 | |
23 | 23 | |
24 | 24 | |
|
Collapse file
benchmark/timers/timers-insert-pooled.js
Copy file name to clipboardExpand all lines: benchmark/timers/timers-insert-pooled.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | | - |
| 9 | + |
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
| 17 | + |
18 | 18 | |
Collapse file
benchmark/timers/timers-insert-unpooled.js
Copy file name to clipboardExpand all lines: benchmark/timers/timers-insert-unpooled.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | 17 | |
18 | | - |
| 18 | + |
19 | 19 | |
20 | 20 | |
21 | 21 | |
|
Collapse file
benchmark/timers/timers-timeout-pooled.js
Copy file name to clipboard+21-9Lines changed: 21 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
| 5 | + |
| 6 | + |
4 | 7 | |
5 | | - |
| 8 | + |
6 | 9 | |
7 | 10 | |
8 | 11 | |
9 | | - |
10 | | - |
| 12 | + |
| 13 | + |
11 | 14 | |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
| 15 | + |
| 16 | + |
| 17 | + |
17 | 18 | |
18 | 19 | |
19 | 20 | |
20 | 21 | |
21 | | - |
| 22 | + |
22 | 23 | |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
23 | 35 | |
0 commit comments