-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIruntime-asynctenet-performancePerformance related issuePerformance related issue
Milestone
Description
This issue captures some identified poorly performing coding patterns when runtime async is enabled, and some possible mitigations we should consider implementing.
- Common pattern of using synchronous Task-returning wrappers is currently a deoptimization ([runtime-async] Optimize synchronous Task-returning wrappers used in async context #115771)
- Egor points out that Task.FromResult is common too
- Issue identifies potential way to optimize this by aggressively inlining into runtime-async callable thunks.
- Large structs in runtime async may be repeatedly copied to and from heap if suspension/resumption is frequent (Support dynamically creating tailored continuation layouts #120411 (comment))
- Potential fix probably involves PGO information to identify methods where suspension/resumption is common, or analysis of the size of continuations created
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIruntime-asynctenet-performancePerformance related issuePerformance related issue