Skip to content

Conversation

@WyriHaximus
Copy link
Member

This makes awaiting an already resolved promise significantly faster.

Ported from: #18

@WyriHaximusWyriHaximus added this to the v2.0.0 milestone Jan 10, 2022
@WyriHaximusWyriHaximus requested review from clue and jsorJanuary 10, 2022 07:46
@WyriHaximusWyriHaximusforce-pushed the 2.x--fastforward-resolved-promise branch 2 times, most recently from c30cebf to 6e0444cCompareJanuary 17, 2022 13:10
@WyriHaximusWyriHaximusforce-pushed the 2.x--fastforward-resolved-promise branch 2 times, most recently from fe531c7 to 2854f1fCompareJanuary 25, 2022 16:03
@WyriHaximusWyriHaximusforce-pushed the 2.x--fastforward-resolved-promise branch 5 times, most recently from a2deae8 to 08a009eCompareFebruary 11, 2022 19:33
This makes `await`ing an already resolved promise significantly faster. Ported from: reactphp#18
@WyriHaximusWyriHaximusforce-pushed the 2.x--fastforward-resolved-promise branch from 08a009e to 5b572feCompareFebruary 11, 2022 19:34
@WyriHaximus
Copy link
MemberAuthor

After discussing this PR with @SimonFrings and @clue we came to the conclusion that porting #18 to #22 and this PR doesn't introduce only more code and no performance gainst at all. We got a bit excited about the idea of doing this without realizing this makes the function more complex while the loop would instantly be stopped anyway. And that fraction of a millisecond gain we might get from doing this is not worth it. It was however very much worth doing this for fibers in #18.

@clueclue removed this from the v2.0.0 milestone Feb 23, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@WyriHaximus@clue