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
{{ message }}
Repository navigation
Fast path for {U}Int128.operator % when the modulus is within UInt64 #106915
The issue here isn't really that there is no "fast path", it's that it's implemented as left - (left / right) * right when instead it should be computing the remainder as part of the division, where its essentially "free".
The cost is significantly higher with the multi-step process because we have to fallback to a full division and multiplication algorithm.
Activity
tannergooding commentedon Aug 24, 2024
The issue here isn't really that there is no "fast path", it's that it's implemented as
left - (left / right) * rightwhen instead it should be computing the remainder as part of the division, where its essentially "free".The cost is significantly higher with the multi-step process because we have to fallback to a full division and multiplication algorithm.
dotnet-policy-service commentedon Aug 24, 2024
Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.