async Local function use with locals allocate (even if never called) #18946
Labels
Area-Compilers
Code Gen Quality
Room for improvement in the quality of the compiler's generated code
Feature Request
Milestone
Version Used:
Steps to Reproduce:
https://github.com/benaadams/Issues/tree/master/LocalFunctionAllocations
Pass via params: No allocations
Pass via locals: Allocations (even when Local function is never called)
Expected Behavior:
No allocations
Actual Behavior:
2.45 kB of allocations (and performance impact)
The
ValueTask
path is pretty close to the sync path when passing to the local function async fallback via params; but not when using locals; even though the fallback is never used./cc @mgravell @stephentoub @davidfowl
The text was updated successfully, but these errors were encountered: