Karim Belabas on Sat, 03 Sep 2022 11:14:33 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: all divisors of a cyclotomic integer


* Karim Belabas [2022-09-02 16:12]:
[...]
> - use multiplications by prime ideals which are much cheaper than general
>   multiplications; note that idealfactorback doesn't use this trick
>   because it must cater to arbitrary "factorizations" involving arbitrary
>   ideals not only primes [it could check its input first then take
>   advantage of the trick if possible; but it currently doesn't]

I just fixed that one. A random benchmark:

  k=nfinit(x^6+108);
  p=idealprimedec(k,2)[1];
  q=idealprimedec(k,3)[1];
  r=idealprimedec(k,5)[1]; P=[p,q,r];
  for(i=1,10^3, forvec(E=vector(3, i, [0,3]), idealfactorback(k,P,E)))

Before commit b8050f0d7:
  time = 6,381 ms.
After:
  time = 1,728 ms.

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251), Université de Bordeaux
Vice-président en charge du Numérique
T: (+33) 05 40 00 29 77; http://www.math.u-bordeaux.fr/~kbelabas/
`