hermann on Thu, 06 Jul 2023 11:46:13 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to do t_INT bit operations? |
On 2023-07-06 09:14, hermann@stamm-wilbrandt.de wrote: ...
A very first test with splitting exponentiation into 2 and then multiply results on slow Raspberry Pi400 shows that runtime does not get worse by doing so:
... On 7600X target CPU number did not decrease. Reason was that I measured the sum of both exponentiations, while they should run in parallel. So I reported all exponentiation times and really both exponentiations on exponents with half the bits set is always a bit faster than first time, but not much: hermann@7600x:~/RSA_numbers_factored/pari$ gp -q split.gp prime p has 2467 decimal digits length 8193 bits length 5 bits set 66ms 0ms 64ms hermann@7600x:~/RSA_numbers_factored/pari$ vi split.gp hermann@7600x:~/RSA_numbers_factored/pari$ gp -q split.gp prime p has 10000 decimal digits length 33218 bits length 16431 bits set 2395ms 2274ms 2276ms hermann@7600x:~/RSA_numbers_factored/pari$ vi split.gp hermann@7600x:~/RSA_numbers_factored/pari$ gp -q split.gp prime p has 36401 decimal digits length 120921 bits length 60327 bits set 57396ms 53865ms 53959ms hermann@7600x:~/RSA_numbers_factored/pari$ To be tested, whether splitting into exponents with 8.3% bits set will provide more speedup. hermann@7600x:~/RSA_numbers_factored/pari$ diff split.gp.orig split.gp 14c14,16 < p = 2 ^ 2 ^ 13 + 897; ---
R(n) = { (10^n - 1) \ 9; } \\ p = 2 ^ 2 ^ 13 + 897;
15a18
p = 34 * R(36400) - 42000040044444004000024 * 10^2264 * R(36400) \ R(4550) - 1;
32a36
print(Str(gettime())"ms");
34d37 < s=lift(s1*s2); 35a39
s=lift(s1*s2);
hermann@7600x:~/RSA_numbers_factored/pari$ Regards, Hermann.