Open chfast opened 1 year ago
If you consider 256x256 bit division (i.e. 4-by-4 words division) where division by 1 and 2 words is already fast, the Small Quotient Division should nicely apply to remaining 4-by-4 and 4-by-3 cases.
https://gmplib.org/manual/Small-Quotient-Division
Code comment in GMP: https://gmplib.org/repo/gmp/file/tip/mpn/generic/tdiv_qr.c#l171
If you consider 256x256 bit division (i.e. 4-by-4 words division) where division by 1 and 2 words is already fast, the Small Quotient Division should nicely apply to remaining 4-by-4 and 4-by-3 cases.
https://gmplib.org/manual/Small-Quotient-Division
Code comment in GMP: https://gmplib.org/repo/gmp/file/tip/mpn/generic/tdiv_qr.c#l171