Does the following have any performance issues (e.g. performing boxing)?
public int CompareIntValues(int left, int right)
{
return left.CompareTo(right);
}
Some further information. The application is supposed to be soft real time, so using C# is perhaps an odd choice. However, that’s out of my hands.
There wouldn’t be any boxing with what you have as Int32 defines two overloads to CompareTo, one that takes an
intand one that takes anobject. In your example above, the former will be called. If the latter must be called, then boxing would occur.