Promise.all(iterable) and Promise.race(iterable) should Get Promise.resolve before iterating over iterable
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: jorendorff, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The spec recently changed. I guess this is a performance hack to the spec.
Test262 changed in this commit.
These tests now fail on a new test262 import:
- test262/built-ins/Promise/all/invoke-resolve-get-error-close.js
- test262/built-ins/Promise/all/invoke-resolve-get-once-multiple-calls.js
- test262/built-ins/Promise/race/invoke-resolve-get-once-no-calls.js
- test262/built-ins/Promise/race/invoke-resolve-get-error-close.js
- test262/built-ins/Promise/race/invoke-resolve-get-once-multiple-calls.js
Assignee | ||
Comment 1•5 years ago
|
||
This optimisation added to the specification doesn't improve performance for us,
because we're already optimising the lookups in Promise.all & co. So we only
need to perform the initial check for PromiseLookup::isDefaultPromiseState
outside of the main loop in CommonPerformPromiseAllRace
and that's more or
less all what needs to be changed.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=25d29e2415c40e40e480988a9a964385e593b0cc
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e6589458455
Retrieve "resolve" property only once in PromiseAll, PromiseRace, and PromiseAllSettled. r=arai
Comment 5•5 years ago
|
||
bugherder |
Description
•