Commit d93c48b
committed
src: use ObjectTemplate for creating stream req objs
This allows V8 to avoid preparing a execution context
for the constructor, to give a (kinda) small but noticeable
perf gain.
Benchmarks (only this commit):
$ ./node benchmark/compare.js --new ./node --old ./node-master --filter net-c2s.js --set len=10 --set type=asc --runs 360 net | Rscript benchmark/compare.R
[01:15:27|% 100| 1/1 files | 720/720 runs | 1/1 configs]: Done
confidence improvement accuracy (*) (**) (***)
net/net-c2s.js dur=5 type='asc' len=10 *** 0.69 % ±0.31% ±0.41% ±0.53%
PR-URL: #18936
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 12b9ec0 commit d93c48b
4 files changed
+25
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | | - | |
| 207 | + | |
207 | 208 | | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
430 | 441 | | |
431 | 442 | | |
432 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
| |||
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
| 83 | + | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
| |||
0 commit comments