General mpn_gcd_basecase

Torbjörn Granlund tg at gmplib.org
Sun Sep 1 21:54:28 UTC 2019


"Marco Bodrato" <bodrato at mail.dm.unipi.it> writes:

  My code uses a 256 table... but extends it to a 1024 one...

  What does the "binary tab###" single-limb implementation exactly do?

Here is the program which generated it all:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcd_binary_algos.c
Type: application/octet-stream
Size: 1247651 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20190901/bc92a41e/attachment-0001.obj>
-------------- next part --------------

(The code is not intended for optimal speed, but just for experimenting
with various ideas.  E.g., I make use unpredictable branches in
performance-critical places.)

  Yes, storing some unused bits in the table was not a good idea for clarity.

  I send it again, I changed some variable names, added some comments and
  some #ifdef to experiment the different flavours.

It takes some time to grasp these bit trickery, no critique against your
code style intended!

-- 
Torbj?rn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list