Skip to content

Conversation

@vneiger
Copy link
Owner

@vneiger vneiger commented Jan 4, 2026

  • provide a verification function is_kernel (which still lacks some generation check) and make testing more complete for kernel basis functions
  • add a function for kernel via approximation at large order (useful for very unbalanced shifts)
  • review recent code for ZLS algorithm and provide an "enhanced" version (see below)
  • add a profile file to benchmark performance
  • add an interface that provides a convenient choice for the orientation (left kernel, right kernel, and conventions for pivots in weak Popov form)

Enhanced because the modified version:

  • returns a basis in a stronger form (ordered weak Popov form, rather than reduced)
  • is often faster (sometimes marginally), thanks to the use of more aggressive parameters (in particular for the order when calling approximant basis).

@vneiger
Copy link
Owner Author

vneiger commented Jan 4, 2026

Some timings.
The column flint is for nmod_poly_mat_nullspace: this has a weaker output, by computing a basis of the rational nullspace (which most often does not generate the polynomial kernel via polynomial combinations), and not ensuring any kind of reducedness.

*****************************************************
*  left kernel of rdim x cdim matrix of degree deg  *
*****************************************************

bits rdim cdim deg     approx   zls(now) flint    zls(before)
50   5    1    2       2.94e-06 3.37e-06 1.77e-07 7.31e-06
50   5    1    5       9.05e-06 6.36e-06 1.84e-07 2.13e-05
50   5    1    10      2.36e-05 1.41e-05 2.02e-07 6.02e-05
50   5    1    20      6.84e-05 3.41e-05 2.03e-07 1.62e-04
50   5    1    40      1.66e-04 8.47e-05 2.09e-07 3.35e-04
50   5    1    80      4.77e-04 2.43e-04 2.33e-07 8.44e-04
50   5    1    160     1.24e-03 7.73e-04 4.48e-07 1.95e-03
50   5    1    320     3.18e-03 2.15e-03 6.98e-07 4.65e-03
50   5    1    640     7.68e-03 5.57e-03 1.27e-06 1.06e-02
50   5    1    1280    1.86e-02 1.47e-02 2.45e-06 2.40e-02
50   5    1    2560    4.63e-02 3.99e-02 4.82e-06 5.68e-02
50   5    1    5120    1.12e-01 9.05e-02 1.00e-05 1.31e-01
50   5    1    10240   2.59e-01 2.29e-01 2.21e-05 2.96e-01
50   5    4    2       1.08e-05 1.52e-05 3.25e-06 4.77e-05
50   5    4    5       5.22e-05 4.12e-05 8.20e-06 1.07e-04
50   5    4    10      2.11e-04 1.06e-04 2.38e-05 2.34e-04
50   5    4    20      7.88e-04 2.97e-04 6.20e-05 7.58e-04
50   5    4    40      2.36e-03 1.06e-03 1.59e-04 2.13e-03
50   5    4    80      6.72e-03 2.37e-03 3.91e-04 5.81e-03
50   5    4    160     1.80e-02 5.71e-03 9.51e-04 1.56e-02
50   5    4    320     4.78e-02 1.57e-02 2.43e-03 3.94e-02
50   5    4    640     1.37e-01 3.51e-02 5.11e-03 1.03e-01
50   5    4    1280    3.13e-01 8.79e-02 1.06e-02 2.54e-01
50   5    4    2560    7.71e-01 2.11e-01 2.20e-02 5.96e-01
50   5    4    5120    1.82e+00 5.13e-01 4.45e-02 1.44e+00
50   5    4    10240   4.37e+00 1.19e+00 1.12e-01 3.40e+00
50   100  1    2       4.91e-04 4.01e-04 7.33e-06 1.59e-03
50   100  1    5       1.51e-03 7.70e-04 7.53e-06 4.14e-03
50   100  1    10      4.57e-03 1.42e-03 7.68e-06 1.32e-02
50   100  1    20      3.57e-02 2.70e-03 7.75e-06 7.94e-02
50   100  1    40      1.38e-01 8.03e-03 8.61e-06 3.15e-01
50   100  1    80      4.43e-01 1.87e-02 1.08e-05 9.59e-01
50   100  1    160     1.28e+00 4.43e-02 1.51e-05 2.81e+00
50   100  1    320     3.48e+00 1.16e-01 2.05e-05 7.49e+00
50   100  50   2       2.58e-01 5.30e-03 1.84e-01 1.16e-02
50   100  50   5       2.35e+00 1.85e-02 1.02e+00 3.58e-02
50   100  50   10      7.19e+00 4.89e-02 2.71e+00 1.07e-01
50   100  50   20      2.08e+01 2.24e-01 6.64e+00 4.44e-01
50   100  50   40      5.70e+01 8.21e-01 1.61e+01 1.55e+00
50   100  50   80      xxxxxxxx 2.98e+00 3.58e+01 5.85e+00
50   100  50   160     xxxxxxxx 1.42e+01 xxxxxxxx 2.11e+01
50   100  99   2       8.96e-01 1.79e-02 6.48e-01 6.86e-02
50   100  99   5       1.08e+01 9.50e-02 3.72e+00 3.35e-01
50   100  99   10      4.02e+01 3.10e-01 1.04e+01 1.21e+00
50   100  99   20      1.25e+02 9.74e-01 2.75e+01 4.33e+00
50   100  99   40      xxxxxxxx 3.08e+00 6.71e+01 1.41e+01

@vneiger vneiger marked this pull request as ready for review January 5, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants