Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Issue 2512103002: [async-await] Don't create resolving callbacks for throwaway promises (Closed)

Created:
4 years, 1 month ago by gsathya
Modified:
4 years, 1 month ago
Reviewers:
caitp, Dan Ehrenberg
CC:
jgruber, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[async-await] Don't create resolving callbacks for throwaway promises This patch also cleans up NewPromiseCapability. This patch results in a 20% improvement over 4 runs with the following micro benchmark - var x = Promise.resolve(); async function bar() { return x; } async function foo() { await bar(); } var start = performance.now(); var count = 0; var max = 10000; for(var i = 0; i <= max; i++) { foo().then(() => { count++; if(count === max) print( performance.now() - start ); }) } BUG=v8:5639 Committed: https://crrev.com/764548e2cd80f8f50b2c62cc944a183fc7779af6 Cr-Commit-Position: refs/heads/master@{#41116}

Patch Set 1 #

Total comments: 10

Patch Set 2 : create NewPromiseCapabilityWithoutCallbacks #

Patch Set 3 : fix typo #

Total comments: 7

Patch Set 4 : fix comment #

Patch Set 5 : rename to CreateInternalPromiseCapability #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -17 lines) Patch
M src/js/async-await.js View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M src/js/promise.js View 1 2 3 4 4 chunks +15 lines, -13 lines 0 comments Download

Messages

Total messages: 36 (21 generated)
gsathya
4 years, 1 month ago (2016-11-18 05:26:05 UTC) #9
caitp
https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js#newcode303 src/js/promise.js:303: // calling them multiple times. I like that this ...
4 years, 1 month ago (2016-11-18 05:47:15 UTC) #10
gsathya
https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js#newcode303 src/js/promise.js:303: // calling them multiple times. On 2016/11/18 05:47:15, caitp ...
4 years, 1 month ago (2016-11-18 06:02:28 UTC) #11
Dan Ehrenberg
Great perf improvement! https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js#newcode296 src/js/promise.js:296: function NewPromiseCapability(C, debugEvent, doNotCreateCallbacks) { Style ...
4 years, 1 month ago (2016-11-18 08:05:38 UTC) #12
gsathya
https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js#newcode296 src/js/promise.js:296: function NewPromiseCapability(C, debugEvent, doNotCreateCallbacks) { On 2016/11/18 08:05:38, Dan ...
4 years, 1 month ago (2016-11-18 08:34:28 UTC) #13
Dan Ehrenberg
https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js#newcode296 src/js/promise.js:296: function NewPromiseCapability(C, debugEvent, doNotCreateCallbacks) { On 2016/11/18 at 08:34:28, ...
4 years, 1 month ago (2016-11-18 08:55:37 UTC) #14
gsathya
On 2016/11/18 08:55:37, Dan Ehrenberg wrote: > https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js > File src/js/promise.js (right): > > https://codereview.chromium.org/2512103002/diff/1/src/js/promise.js#newcode296 ...
4 years, 1 month ago (2016-11-18 10:07:08 UTC) #19
Dan Ehrenberg
lgtm https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js#newcode135 src/js/promise.js:135: // Pass false for debugEvent so .then chaining ...
4 years, 1 month ago (2016-11-18 12:54:52 UTC) #22
gsathya
Thanks for the reviews! https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js#newcode135 src/js/promise.js:135: // Pass false for debugEvent ...
4 years, 1 month ago (2016-11-18 15:39:49 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2512103002/60001
4 years, 1 month ago (2016-11-18 15:40:00 UTC) #26
caitp
https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js#newcode297 src/js/promise.js:297: function NewPromiseCapabilityWithoutCallbacks() { On 2016/11/18 15:39:48, gsathya wrote: > ...
4 years, 1 month ago (2016-11-18 15:42:29 UTC) #27
gsathya
On 2016/11/18 15:42:29, caitp wrote: > https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js > File src/js/promise.js (right): > > https://codereview.chromium.org/2512103002/diff/40001/src/js/promise.js#newcode297 > ...
4 years, 1 month ago (2016-11-18 15:50:15 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2512103002/80001
4 years, 1 month ago (2016-11-18 15:50:30 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-18 16:15:00 UTC) #34
commit-bot: I haz the power
4 years, 1 month ago (2016-11-18 16:15:29 UTC) #36
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/764548e2cd80f8f50b2c62cc944a183fc7779af6
Cr-Commit-Position: refs/heads/master@{#41116}

Powered by Google App Engine
This is Rietveld 408576698