I would expect the buffering to be independent of the synchronicity - so while it's buffering, "asynchronous" writes are likely to actually complete synchronously (because it's just in memory), at which point it's really, really cheap to await
.
When the buffer gets big enough, it will start writing to the socket, at which point the await
really will be asynchronous with an extra (small) hit.
However, I'd suggest that you can make your code simpler anyway by just joining the words together and then performing a single write. You already have all the data, after all - it's not like you'd be waiting for some of it.
At that point, you'll only have one asynchronous call, so you don't even need to use await
:
Task Respond(HttpResponse res)
{
string data = string.Join("", words.Take(1000)); // Or whatever
return res.Output.WriteAsync(data);
}