Open Bug 1317690 Opened 6 years ago Updated 7 months ago

Support Generators in IonMonkey


(Core :: JavaScript Engine: JIT, enhancement, P3)




Tracking Status
firefox53 --- affected


(Reporter: till, Unassigned)


(Blocks 5 open bugs)


With async/await, Generator performance becomes more important, so at some point we should support them in IonMonkey.

I don't know *how* hard this is, just that it is hard. I also don't really know the right priority for this: the public web won't be using native async/await or Generators for some time, but platform code and addons certainly will.
It would be interesting to check how we actually perform here, compared to other engines. Our generators were a bit faster than in V8 when I added Baseline support, but Turbofan is supposed to handle generators so that probably changed.
Priority: -- → P3
Blocks: 1393712
Blocks: 1521435
Type: defect → enhancement
Blocks: 1565549
No longer blocks: 1565549
Duplicate of this bug: 1565549


We are using a generator heavy approach in a new web component. Turns out it runs really slowly in Firefox. Found this jsperf ( and tried it on Chrome, Safari and FF on my machine. Safari was roughly twice as fast as FF, Chrome seven times faster. Any hope of this improving soon? Would be great!

Johan Isaksson

Any hope for this issue to be resolved? Is it on the radar at least (included in the roadmap)?

(In reply to Nickolay Platonov from comment #4)

Any hope for this issue to be resolved? Is it on the radar at least (included in the roadmap)?

From what I recall this was in the pipeline for December 2019, however, we since decided to simplify a lot SpiderMonkey to reduce the security risks related to IonBuilder usage. There is a project which is currently investigating the simplification of IonBuilder, and maybe replace it by WarpBuilder (Bug 1613592).

While this is not directly related, this is a higher priority at the moment.
I will raise this topic to the team, to see if we should raise the priority of generators in IonMonkey.

Thanks for the update! Yes, please draw some attention to this issue. We wrote a "modern" system, that uses generators a lot, and discovered the performance in FF is very bad (#1565549). In the same time its so powerful feature, arguably a best addition to JS spec in its history.

Yeah we expect this to be significantly easier with WarpBuilder in the future. Note though that Ion/Warp-compiling them is just part of it, generators also require more environment objects right now, and that could be a bigger issue than them not running in Ion.

You need to log in before you can comment on or make changes to this bug.