Skip to content

Generic mulmid algorithms#2615

Merged
fredrik-johansson merged 2 commits intoflintlib:mainfrom
fredrik-johansson:mulmid2
Mar 21, 2026
Merged

Generic mulmid algorithms#2615
fredrik-johansson merged 2 commits intoflintlib:mainfrom
fredrik-johansson:mulmid2

Conversation

@fredrik-johansson
Copy link
Copy Markdown
Collaborator

The classical, KS and complex_reorder mullow algorithms for gr_poly are generalized to mulmid variants (I did not do mullow_toom_serial which is currently not used anywhere).

Timings for power series inverse of $1 + \sum_{k \ge 1} (i+k) x \in (\mathbb{Z}[i])[x]$ (_gr_poly_inv_series with fmpzi coefficients):

         n         old         new  speedup
         2    2.39e-08    2.39e-08  1.000x
         4     8.9e-08    8.88e-08  1.002x
         8    3.27e-07    3.33e-07  0.982x
        16    1.99e-06    1.59e-06  1.252x
        32    7.29e-06    5.69e-06  1.281x
        64    1.21e-05     9.2e-06  1.315x
       128    3.69e-05    2.33e-05  1.584x
       256    0.000191    0.000156  1.224x
       512    0.000554    0.000487  1.138x
      1024     0.00254     0.00232  1.095x
      2048      0.0122      0.0119  1.025x
      4096      0.0536      0.0529  1.013x
      8192        0.24       0.241  0.996x
     16384        1.06       1.052  1.008x
     32768       5.448       5.362  1.016x

Timings for power series inverse of $1 + \sum_{k \ge 1} (y+k) x \in (\mathbb{Z}[y])[x]$ (_gr_poly_inv_series with fmpz_poly coefficients):

         2    6.55e-08    6.46e-08  1.014x
         4    2.74e-07    2.69e-07  1.019x
         8    1.29e-06    1.26e-06  1.024x
        16    8.61e-06    6.77e-06  1.272x
        32    2.85e-05    2.42e-05  1.178x
        64    0.000138    0.000123  1.122x
       128    0.000879    0.000799  1.100x
       256     0.00658     0.00624  1.054x
       512       0.057      0.0542  1.052x
      1024        0.93       0.906  1.026x
      2048      11.323      11.215  1.010x

Timings for power series inverse of $1 + \sum_{k\ge 1} (i+y+k) x \in ((\mathbb{Z}[i])[y])[x]$ (_gr_poly_inv_series with gr_poly coefficients with fmpzi coefficients):

         2    9.65e-08    9.92e-08  0.973x
         4    4.97e-07    4.77e-07  1.042x
         8    3.38e-06    3.34e-06  1.012x
        16    2.84e-05    2.21e-05  1.285x
        32    9.81e-05    8.77e-05  1.119x
        64    0.000581    0.000541  1.074x
       128     0.00609     0.00598  1.018x
       256      0.0533      0.0521  1.023x
       512       0.748       0.734  1.019x
      1024       8.238       8.129  1.013x

@fredrik-johansson fredrik-johansson merged commit ee42f1b into flintlib:main Mar 21, 2026
21 of 22 checks passed
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.

1 participant