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

RESOLVED FIXED in Firefox 42

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jandem, Assigned: evilpie)

Tracking

(Blocks: 1 bug)

unspecified
mozilla42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
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.
(Reporter)

Updated

3 years ago
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?
(Assignee)

Comment 2

3 years ago
Created attachment 8632225 [details] [diff] [review]
baseline-tostring

I haven't looked into implementing this for Ion yet, but at least this should get baseline support going.
Attachment #8632225 - Flags: review?(jdemooij)
(Reporter)

Comment 3

3 years ago
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+
(Assignee)

Updated

3 years ago
Blocks: 1185046
(Assignee)

Updated

3 years ago
Assignee: nobody → evilpies
No longer blocks: 1185046
https://hg.mozilla.org/mozilla-central/rev/37ad44083b99
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.