Closed Bug 1355058 Opened 5 years ago Closed 5 years ago

Fix some minor perf issues in IonBuiler

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(2 files)

No description provided.
getprop/getelem try the TypedObject case first, but this is a waste considering we're not even shipping typed objects in non-Nightly.
Attachment #8856478 - Flags: review?(hv1989)
I noticed we were adding some type constraints in IonBuilder::typedObjectPrediction. We can just reorder the checks so we only add the constraint if we actually have a typed object.
Attachment #8856479 - Flags: review?(hv1989)
At some point we should spend a few days profiling IonBuilder, I'm pretty sure there will be a lot of similar things.
Comment on attachment 8856478 [details] [diff] [review]
Part 1 - Handle TypedObjects last

Review of attachment 8856478 [details] [diff] [review]:
-----------------------------------------------------------------

I agree we should first do the cases that are happening the most. Good find.
Attachment #8856478 - Flags: review?(hv1989) → review+
Comment on attachment 8856479 [details] [diff] [review]
Part 2 - Don't add unused constraints in IonBuilder::typedObjectPrediction

Review of attachment 8856479 [details] [diff] [review]:
-----------------------------------------------------------------

Good find!
Attachment #8856479 - Flags: review?(hv1989) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd4b315d43b9
part 1 - Try the TypedObject optimizations last as typed objects are disabled by default. r=h4writer
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad497a610771
part 2 - Avoid creating unnecessary type constraints in IonBuilder::typedObjectPrediction. r=h4writer
https://hg.mozilla.org/mozilla-central/rev/fd4b315d43b9
https://hg.mozilla.org/mozilla-central/rev/ad497a610771
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.