-
-
Notifications
You must be signed in to change notification settings - Fork 108
perf: eliminate Func creation in ExecuteAsync
#4460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Func creation in ExecuteAsyncFunc creation in ExecuteAsync
SummaryEliminates delegate allocation in Critical IssuesNone found ✅ SuggestionsNone - this is a clean performance optimization that aligns with TUnit's "Performance First" principle. AnalysisThe change converts a capturing lambda (which allocates a closure object) to a static lambda with explicit state passing:
The benchmark screenshots show measurable improvement in allocations, which directly supports TUnit's performance-first philosophy. Verdict✅ APPROVE - No critical issues |
Small change avoid
Actioncreation by using a static lambda and manually boxing state.]Before
After