Performance suggestion: TimeSpan.From* complie as const #94995
-
I think, compiler can optimize TimeSpan.From* calls to insert the value as const into the binary instead of calling the methods. |
Beta Was this translation helpful? Give feedback.
Answered by
KeterSCP
Nov 20, 2023
Replies: 1 comment 2 replies
-
JIT already optimizes this kind of pattern to simple |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
huoyaoyuan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JIT already optimizes this kind of pattern to simple
mov
with a constant value.Sharplab link