Closed Bug 1180184 Opened 9 years ago Closed 9 years ago

Template strings are slow because the JITs don't support JSOP_TOSTRING

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: jandem, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

According to http://kpdecker.github.io/six-speed/, our template strings are 865x slower than the non-template-string alternative.

The problem is that JSOP_TOSTRING is only implemented in the interpreter.
Blocks: 1177318
Could we make intrinsic_ToString/MToString work with all value types?  Because that would be the obvious thing to do in Ion if it were made to work.

Baseline could probably just do a vmcall to ToString, right?
I haven't looked into implementing this for Ion yet, but at least this should get baseline support going.
Attachment #8632225 - Flags: review?(jdemooij)
Comment on attachment 8632225 [details] [diff] [review]
baseline-tostring

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

Thanks! Want to file a follow-up bug for Ion, if you close this one?

I was wondering about using an IC, but considering template strings aren't used much (yet) this is fine.
Attachment #8632225 - Flags: review?(jdemooij) → review+
Blocks: 1185046
Assignee: nobody → evilpies
No longer blocks: 1185046
https://hg.mozilla.org/mozilla-central/rev/37ad44083b99
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: