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
There are various places throughout the codebase where we are using the TripleShift extension method from J2N to perform an unsigned right shift, since older versions of C# did not have this operator. C# 11 added the >>> operator like Java has to do this, which gets translated directly to the shr.un opcode, so should be more efficient than the several opcodes involved in the various TripleShift overloads, even if it is aggressively inlined. In addition, it will help make direct porting from Java easier.
(Note: the aggressive inlining doesn't seem to be working in our published NuGet packages, as spot checking one example in BaseCharFilter still had a call operation to TripleShift, which is certainly going to be worse for performance than a single opcode.)
I have confirmed this works on net462, our oldest target, with LangVersion set to 11, for all overloads that TripleShift supports.
Need to confirm that setting our LangVersion to 11 does not cause regressions elsewhere.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Task description
There are various places throughout the codebase where we are using the
TripleShift
extension method from J2N to perform an unsigned right shift, since older versions of C# did not have this operator. C# 11 added the>>>
operator like Java has to do this, which gets translated directly to theshr.un
opcode, so should be more efficient than the several opcodes involved in the various TripleShift overloads, even if it is aggressively inlined. In addition, it will help make direct porting from Java easier.(Note: the aggressive inlining doesn't seem to be working in our published NuGet packages, as spot checking one example in BaseCharFilter still had a
call
operation to TripleShift, which is certainly going to be worse for performance than a single opcode.)I have confirmed this works on net462, our oldest target, with LangVersion set to 11, for all overloads that TripleShift supports.
Need to confirm that setting our LangVersion to 11 does not cause regressions elsewhere.
The text was updated successfully, but these errors were encountered: