Commit 9d65724
process: slightly simplify next tick execution
Get rid of separate function to call callback from _tickCallback as
it no longer yields worthwhile performance improvement.
Move some code from nextTick & internalNextTick into TickObject
constructor to minimize duplication.
PR-URL: #16888
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>1 parent 5736dc4 commit 9d65724Copy full SHA for 9d65724
File tree
Expand file treeCollapse file tree
8 files changed
+81
-53
lines changedOpen diff view settings
Filter options
- benchmark/process
- lib/internal/process
- test/message
Expand file treeCollapse file tree
8 files changed
+81
-53
lines changedOpen diff view settings
Collapse file
benchmark/process/next-tick-breadth-args.js
Copy file name to clipboardExpand all lines: benchmark/process/next-tick-breadth-args.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/process/next-tick-breadth.js
Copy file name to clipboardExpand all lines: benchmark/process/next-tick-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/process/next-tick-exec-args.js
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
Collapse file
benchmark/process/next-tick-exec.js
Copy file name to clipboard+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
Collapse file
lib/internal/process/next_tick.js
Copy file name to clipboardExpand all lines: lib/internal/process/next_tick.js+33-44Lines changed: 33 additions & 44 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
60 | 60 | |
61 | 61 | |
62 | 62 | |
63 | | - |
| 63 | + |
64 | 64 | |
65 | 65 | |
66 | 66 | |
| ||
99 | 99 | |
100 | 100 | |
101 | 101 | |
102 | | - |
103 | 102 | |
104 | 103 | |
105 | 104 | |
| ||
125 | 124 | |
126 | 125 | |
127 | 126 | |
128 | | - |
129 | | - |
130 | | - |
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | | - |
136 | | - |
137 | | - |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | | - |
143 | | - |
144 | | - |
145 | | - |
146 | | - |
147 | | - |
148 | 127 | |
149 | 128 | |
150 | 129 | |
151 | 130 | |
152 | 131 | |
153 | 132 | |
154 | 133 | |
155 | | - |
156 | | - |
157 | 134 | |
158 | 135 | |
159 | 136 | |
| ||
173 | 150 | |
174 | 151 | |
175 | 152 | |
176 | | - |
177 | | - |
178 | | - |
179 | | - |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
180 | 158 | |
181 | 159 | |
182 | 160 | |
| ||
191 | 169 | |
192 | 170 | |
193 | 171 | |
| 172 | + |
| 173 | + |
| 174 | + |
194 | 175 | |
195 | 176 | |
196 | | - |
| 177 | + |
197 | 178 | |
198 | 179 | |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
199 | 187 | |
200 | 188 | |
201 | 189 | |
| ||
220 | 208 | |
221 | 209 | |
222 | 210 | |
223 | | - |
224 | | - |
225 | | - |
226 | | - |
| 211 | + |
| 212 | + |
| 213 | + |
227 | 214 | |
228 | | - |
229 | | - |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
230 | 219 | |
231 | 220 | |
232 | 221 | |
| ||
240 | 229 | |
241 | 230 | |
242 | 231 | |
243 | | - |
244 | | - |
245 | | - |
246 | | - |
247 | 232 | |
248 | 233 | |
249 | 234 | |
| ||
256 | 241 | |
257 | 242 | |
258 | 243 | |
259 | | - |
260 | | - |
261 | | - |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
262 | 249 | |
263 | | - |
264 | | - |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
265 | 254 | |
266 | 255 | |
Collapse file
test/message/nexttick_throw.out
Copy file name to clipboardExpand all lines: test/message/nexttick_throw.out-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | 7 | |
9 | 8 | |
10 | 9 | |
|
Collapse file
test/message/stdin_messages.out
Copy file name to clipboardExpand all lines: test/message/stdin_messages.out+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
15 | 14 | |
16 | 15 | |
17 | 16 | |
| ||
29 | 28 | |
30 | 29 | |
31 | 30 | |
32 | | - |
| 31 | + |
33 | 32 | |
34 | 33 | |
35 | 34 | |
| ||
44 | 43 | |
45 | 44 | |
46 | 45 | |
47 | | - |
| 46 | + |
48 | 47 | |
49 | 48 | |
50 | 49 | |
| ||
60 | 59 | |
61 | 60 | |
62 | 61 | |
63 | | - |
| 62 | + |
64 | 63 | |
65 | 64 | |
66 | 65 | |
|
Collapse file
test/message/unhandled_promise_trace_warnings.out
Copy file name to clipboardExpand all lines: test/message/unhandled_promise_trace_warnings.out-2Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
15 | 15 | |
16 | 16 | |
17 | 17 | |
18 | | - |
19 | 18 | |
20 | 19 | |
21 | 20 | |
| ||
34 | 33 | |
35 | 34 | |
36 | 35 | |
37 | | - |
38 | 36 | |
39 | 37 | |
40 | 38 | |
|
0 commit comments