Is your feature request related to a problem or challenge? Please describe what you are trying to do.
i256 division is currently implemented using long division, this is simple but its time complexity is linear with respect to the number of digits in the output quotient. As a result it degrades poorly when dividing large numbers by smaller numbers.
Describe the solution you'd like
There are more sophisticated algorithms for multi-digit division, most famously Knuth Algorithm D.
Describe alternatives you've considered
Additional context
I have a draft implementation of this, that provides a non-trivial performance uplift
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
i256 division is currently implemented using long division, this is simple but its time complexity is linear with respect to the number of digits in the output quotient. As a result it degrades poorly when dividing large numbers by smaller numbers.
Describe the solution you'd like
There are more sophisticated algorithms for multi-digit division, most famously Knuth Algorithm D.
Describe alternatives you've considered
Additional context
I have a draft implementation of this, that provides a non-trivial performance uplift