-
-
Notifications
You must be signed in to change notification settings - Fork 110
perf: convert AfterHookExecutionFlags to struct
#4526
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
SummaryConverts Critical IssuesNone found ✅ SuggestionsPerformance consideration: The struct is instantiated in
Example: [Flags]
internal enum AfterHookExecutionFlags : byte
{
None = 0,
ShouldExecuteAfterClass = 1 << 0,
ShouldExecuteAfterAssembly = 1 << 1,
ShouldExecuteAfterTestSession = 1 << 2
}This would reduce allocation size by ~75% in a hot path. However, if the current approach is clearer and the perf difference is negligible in benchmarks, the readability benefit may outweigh the micro-optimization. Verdict✅ APPROVE - No critical issues |
Convert
AfterHookExecutionFlagstostruct,Before
After