Fix some minor perf issues in IonBuiler

RESOLVED FIXED in Firefox 55

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
8 months ago
7 months ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(2 attachments)

Comment hidden (empty)
(Assignee)

Comment 1

8 months ago
Created attachment 8856478 [details] [diff] [review]
Part 1 - Handle TypedObjects last

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)
(Assignee)

Comment 2

8 months ago
Created attachment 8856479 [details] [diff] [review]
Part 2 - Don't add unused constraints in IonBuilder::typedObjectPrediction

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)
(Assignee)

Comment 3

8 months ago
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+

Comment 6

7 months ago
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
Last Resolved: 7 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.