Reserve space in the properties vector to avoid costly vector growth
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
Details
(Whiteboard: [sp3])
Attachments
(1 file)
See Bug 1836679, Comment #2 for motivation
Assignee | ||
Comment 1•2 years ago
|
||
On the microbenchmark from Bug 1836679:
$ hyperfine 'obj-with/dist/bin/js keys-benchmark.js' 'obj-without/dist/bin/js keys-benchmark.js'
Benchmark 1: obj-with/dist/bin/js keys-benchmark.js
Time (mean ± σ): 256.9 ms ± 2.2 ms [User: 257.9 ms, System: 8.9 ms]
Range (min … max): 254.3 ms … 262.5 ms 11 runs
Benchmark 2: obj-without/dist/bin/js keys-benchmark.js
Time (mean ± σ): 349.4 ms ± 1.0 ms [User: 351.0 ms, System: 10.0 ms]
Range (min … max): 347.6 ms … 350.9 ms 10 runs
Summary
'obj-with/dist/bin/js keys-benchmark.js' ran
1.36 ± 0.01 times faster than 'obj-without/dist/bin/js keys-benchmark.js'
Assignee | ||
Comment 2•2 years ago
|
||
Funny story: I can get almost the same performance here by just changing the template parameter on StackGCVector to have 16 elements rather than 8 -- I'm evalauting that change more holistically at the moment (mach try perf is submitting at the moment)
Assignee | ||
Comment 3•2 years ago
|
||
So, just for giggles I tried Speedometer 3 with a bigger StackVector inline size; no impact
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
bugherder |
Description
•