Skip to content
Discussion options

You must be logged in to vote

Your constructor is already too large to get inlined. It's just that you added a / 1 to make the JIT think your method can be somewhat "foldable" so that the JIT increases the inline heuristics multiplier (which is used to compute the benefit/cost) by a bit for you. And it happens to make your constructor able to be inlined under the new multiplier value because now the JIT thinks it's more beneficial to inline your constructor.
The heuristics change almost every version of .NET so don't rely on the behavior of heuristics.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@ladeak
Comment options

Comment options

You must be logged in to vote
4 replies
@ladeak
Comment options

@huoyaoyuan
Comment options

@ladeak
Comment options

@hez2010
Comment options

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