You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The System.StringComparison type is an enum, which uses the default int underlying storage type.
The Glob.Match method includes an in StringComparison parameter. I would expect that at best this will offer no benefit and at worst it will add unnecessary extra overhead. With some value types, use of in reduces the amount of work required to invoke a method, but generally that only works if the value type in question is larger than a pointer. In this case, it's either the same size as a pointer, or, in a 64-bit process, it's actually half the size of a pointer, so there's no obvious benefit to passing by read-only reference (in) here.
So unless something odd is going on in the JIT, this seems likely either to have no effect or to make things worse.
The text was updated successfully, but these errors were encountered:
The
System.StringComparison
type is anenum
, which uses the defaultint
underlying storage type.The
Glob.Match
method includes anin StringComparison
parameter. I would expect that at best this will offer no benefit and at worst it will add unnecessary extra overhead. With some value types, use ofin
reduces the amount of work required to invoke a method, but generally that only works if the value type in question is larger than a pointer. In this case, it's either the same size as a pointer, or, in a 64-bit process, it's actually half the size of a pointer, so there's no obvious benefit to passing by read-only reference (in
) here.So unless something odd is going on in the JIT, this seems likely either to have no effect or to make things worse.
The text was updated successfully, but these errors were encountered: