I'm curious what the behaviour/performance overhead is when I have a function like:
async def slow_function(some_resource):
if some_resource in cache.keys():
return cache[some_resource]
return await requests.get(some_resource)
In the case where we somehow cache "some_resource", there is no "await" executed. What is the overhead of "async" in this case? Is it literally zero overhead since no "await" statement is reached? Or is there some unavoidable overhead no matter what, when an "async" function is called?