I got rid of the async and await keywords. This makes the Get method synchronous. It just passes the task on and does not wait for the result.
Both pieces of code work the same, but are they equally efficient? Let's check it out!
So what's the difference?
The await keyword is syntactic sugar. In fact, when compiled, it is turned into a state machine that manages the asynchronous code. Additional code increases execution time and consumes additional resources.
As you can see, the code without unnecessary operators is almost twice as fast!
I have put all the benchmark code in my GitHub repository so you can test it yourself. You can find the repository here.
Finally
I hope I convince you that it is not always worth it to await every single async method call. As always, if you have any interesting thoughts on this topic, please let me know!