Constant mod over chars can use a cheaper FastMod #111492
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
help wanted
[up-for-grabs] Good issue for external contributors
in-pr
There is an active PR which will close this issue when it is merged
Milestone
#101001 added a faster variant of
FastMod
thatSearchValues
now uses when it knows that the value and divisor are both < 2^16 (i.e.char
s).Instead of
runtime/src/libraries/System.Private.CoreLib/src/System/Collections/HashHelpers.cs
Line 107 in e71d737
we can use
runtime/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticMapState.cs
Line 223 in e71d737
Is it worth teaching the JIT to do something similar when it knows that values are in range?
sharplab
The text was updated successfully, but these errors were encountered: