Does async/await have an extra cost associated when returning early from the method?
问题 Does async/await have an extra cost associated when returning early from the method compared to the synchronous method? Take these examples: public async Task<bool> TryDoSomethingAsync() { if ( Is99PercentOfTheCases() ) return false; // does this path... await DoSomethingAsync(); return true; } // versus public bool TryDoSomething() { if ( Is99PercentOfTheCases() ) return false; // ...have the same cost as this path? DoSomething(); return true; } I know async/await has an extra cost