Commit e854c95
util: improve spliceOne perf
Do less variable allocations and reassignments inside spliceOne
since it's relied on by some performance sensitive code.
PR-URL: #20453
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>1 parent 58a65d6 commit e854c95Copy full SHA for e854c95
File tree
Expand file treeCollapse file tree
3 files changed
+39
-3
lines changedOpen diff view settings
Filter options
- benchmark/util
- lib/internal
- test/parallel
Expand file treeCollapse file tree
3 files changed
+39
-3
lines changedOpen diff view settings
Collapse file
benchmark/util/splice-one.js
Copy file name to clipboard+33Lines changed: 33 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 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
Collapse file
+4-3Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
322 | 322 | |
323 | 323 | |
324 | 324 | |
325 | | - |
| 325 | + |
| 326 | + |
326 | 327 | |
327 | | - |
328 | | - |
| 328 | + |
| 329 | + |
329 | 330 | |
330 | 331 | |
331 | 332 | |
|
Collapse file
test/parallel/test-benchmark-util.js
Copy file name to clipboardExpand all lines: test/parallel/test-benchmark-util.js+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
| 13 | + |
| 14 | + |
13 | 15 | |
14 | 16 | |
15 | 17 | |
0 commit comments