Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e23b4d03 authored by Niels Möller's avatar Niels Möller
Browse files

Replace div2 implementation.

* mpn/generic/hgcd2.c (HGCD2_DIV2_METHOD): New define.
(div2): Replaced, since the old implementation had lots of poorly
predicted and expensive branches. Two new implementaions, selected
by HGCD2_DIV2_METHOD.
(div2) [HGCD2_DIV2_METHOD == 1]: Calls div1 on the high limbs,
with unlikely case handling large quotients.
(div2) [HGCD2_DIV2_METHOD == 2]: The previously #if:ed out
version. A bitwise division, relying on fast count_leading_zeros,
and with fewer branches than the previous code.
parent 2c9688d4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment