Dear all,
for testing purposes I am in need of an UFD in Sage for which is_unit is significantly slower than is_one. Note that, unfortunately, quotient rings do not seem supported currently.
Background: my pull request
https://github.com/sagemath/sage/pull/38924 provides a critical speedup for several computations. Originally, I did this to make my functional equations solver usable, but it also affects completely unrelated code. For example,
sage: P.<x,y>=ProjectiveSpace(QQbar, 1)
sage: E=EllipticCurve([1, 2])
sage: f=P.Lattes_map(E, 2)
sage: f.Lattes_to_curve(check_lattes=true)
gets a speedup from 14 seconds down to 8 seconds.
The pull requests optimises a gcd computation in generic (i.e., non-libsingular) polynomial rings. One difference is, that when computing the content of a polynomial, I am checking for is_unit(), rather than is_one().
In all rings I could construct, there is not a huge difference in timings for the two methods. But I would like to make sure that I am not missing anything, especially since we still do not have any performance regression tests.
Best wishes,
Martin