Skip to content

Performance suggestion: TimeSpan.From* complie as const #94995

Closed Answered by KeterSCP
Meister1977 asked this question in Ideas
Discussion options

You must be logged in to vote

JIT already optimizes this kind of pattern to simple mov with a constant value.
Sharplab link

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tannergooding
Comment options

@Meister1977
Comment options

Answer selected by huoyaoyuan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants