Closed Bug 1777222 Opened 2 years ago Closed 2 years ago

Optimize NewPlainObjectWithProperties

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(5 files)

No description provided.

If the caller knows there are no duplicate or integer keys, we don't need to check
for these cases.

Depends on D150556

With TI we had a cache for this but we got rid of it when we removed TI. This patch
adds back a simpler version of it that caches the four most recently created
shapes. This cache has a good hit rate on the web and on Kraken's json-parse-financial
test.

Depends on D150557

This speeds up JSON.parse quite a lot. Looking at the logs for the dromaeo jobs (this also runs Kraken) on autoland:

Linux64 before:

[#8] json-parse-financial  Cycles:10  Average:39.40  Median:40.00  stddev:1.65 (4.1%)  stddev-sans-first:1.64
Values: 41.0  39.0  42.0  38.0  40.0  38.0  37.0  40.0  41.0  38.0

Linux64 after:

[#8] json-parse-financial  Cycles:10  Average:27.20  Median:27.00  stddev:1.62 (6.0%)  stddev-sans-first:1.72
Values: 27.0  26.0  31.0  27.0  26.0  27.0  26.0  29.0  26.0  27.0

That's > 30% faster.

Big improvements here on AWFY:

json-parse-inspector-Average
json-parse-inspector-First
json-parse-inspector-Geometric
json-parse-inspector-Worst


Lots of smaller improvements here on AWFY:

Vanilla-ES2015-TodoMVC/CompletingAllItems
Vanilla-ES2015-TodoMVC/CompletingAllItems/Sync
Vanilla-ES2015-TodoMVC/DeletingItems
Vanilla-ES2015-TodoMVC/DeletingItems/Sync
VanillaJS-TodoMVC
VanillaJS-TodoMVC/CompletingAllItems
VanillaJS-TodoMVC/CompletingAllItems/Sync
VanillaJS-TodoMVC/DeletingAllItems
VanillaJS-TodoMVC/DeletingAllItems/Sync

Blocks: 1801194
No longer blocks: js-perf-experiments
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: