Skip to content

quinary_module: eliminate deprecation warnings (huge slowdown)

Gonzalo Tornaria requested to merge tornaria/quinary:deprecation into master

Minor update to avoid deprecations with sagemath 10.4.

In one case, base_change_to() is so slow that it takes 2800s instead of 30s to compute a single T2 (level 79*5^2, dimension 612).

$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.4, Release Date: 2024-07-19                    │
│ Using Python 3.12.7. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: q = DiagonalQuadraticForm(ZZ, [1,2,3,4,5])
sage: %timeit q.base_change_to(ZZ)
<magic-timeit>:1: DeprecationWarning: base_change_to is deprecated. Please use change_ring instead.
See https://github.com/sagemath/sage/issues/35248 for details.
49.6 ms ± 2.05 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
sage: %timeit q.change_ring(ZZ)
11.5 μs ± 190 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

Merge request reports