Check if the JsonNumber (JsonString and JsonBoolean) implementation of == operator:
public static bool operator ==(JsonNumber left, JsonNumber right)
{
// Test "right" first to allow branch elimination when inlined for null checks (== null)
// so it can become a simple test
if (right is null)
{
// return true/false not the test result https://github.com/dotnet/coreclr/issues/914
return (left is null) ? true : false;
}
return right.Equals(left);
}
remains simple or gets more complex and if requires the [MethodImpl(MethodImplOptions.AggressiveInlining)] attribute and how adding it will affect performance.
_Originally posted by @ahsonkhan in dotnet/corefx#40107 (comment)
Check if the
JsonNumber(JsonStringandJsonBoolean) implementation of == operator:remains simple or gets more complex and if requires the
[MethodImpl(MethodImplOptions.AggressiveInlining)]attribute and how adding it will affect performance._Originally posted by @ahsonkhan in dotnet/corefx#40107 (comment)