Friday, 4 September 2020

Is there any difference in performance between awaiting a promise, returning awaited value in an async function, or just returning promise from a function ?

So what I mean is this, imagine having this piece of code:const x = async () => await Promise.resolve("yikes") const y = async () => Promise.resolve("yikes") we will need to await both X and Y functions to get "yikes" back, so what is the difference between these two approaches in terms of performance?

Submitted September 04, 2020 at 01:56PM by warchild4l

No comments:

Post a Comment