mpn_sqrtrem1

Torbjörn Granlund tg at gmplib.org
Mon Dec 19 16:07:15 UTC 2016


Adrien!

We need fast code for computing the square root of 32-bit and 64-bit
numbers on 32-bit machines.

We need fast code for computing the square root of 64-bit and 128-bit
numbers on 64-bit machines.

I.e., we need single-word and and double-word square root in both cases.

Now, I am a bit confused about what you've implemented, and also how to
compile your code.

When trying a plain compile of your code, I get complaints about
smul64x2 being undefined.  I spotted the MACHINE_X86_64 macro, which
allows me to compile things.

Benchmarking the 32-bit code for a 64-bit machine is not very
interesting, at least not if that means we take advantage of 64-bit
arithmetic.

Please give me some guidance.  I'd like to start with a performance
evaluation.

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


More information about the gmp-devel mailing list