Replies: 2 comments 12 replies
-
The code can run the GCD part of polybench nicely and shows performance nearly at FLINT's native level. When I try univariate tests FORM is "stuck" at 10^-3 seconds: I think due to Ubuntu 20.04's packaged libflint-dev does not contain all the required functions, making the github actions test fail to build. Compiling FLINT as part of the actions would be very time consuming. (I am testing using 24.04 on my own system). The tests pass, I edited one to remove dependence on the sign of the denominator currently. |
Beta Was this translation helpful? Give feedback.
-
Status update: I have made various bugfixes after some more testing, with a test which generates random polynomials and compares the output with the current poly code for everything that is implemented so far. It was a bit tricky to work out how to reproduce the sign of the result of gcd_, poly does things a bit strangely there. See the comments in jodavies@33e4743 . Currently poly could even be considered buggy, since What should we do here? The remaining bits to do are expression (un)factorization, and inverse_. inverse_ is a bit strange: it is not nice that it just terminates form if an inverse is not found, and it completely ignores denominators in the input. Thus |
Beta Was this translation helpful? Give feedback.
-
I have a work-in-progress implementation of an interface to flint for polynomial arithmetic: https://github.com/jodavies/form/tree/flint-prf
So far it is enough to use for PolyRatFun without special modes (expand or modulus).
The results are very good. The univariate and multivariate tests in user.frm are 2x and 10x faster respectively. The forcer test (after making the integrals harder) is also ~1.6x faster. The harder you make these tests the better the benefit (presumably until expressions start being written to disk etc, and then the polynomial code takes a smaller % of the runtime).
Given the excellent performance, I think at least some amount of flint support should go into FORM5.
Currently the "sign convention" of numerator and denominator is not guaranteed to be the same as the poly code due to how it fixes its signs before an additional sort into FORM's highfirst ordering. It might make things easier to break "compatibility" with the poly code here to allow some flexibility in the interface.
Next I will add support for functions like
gcd_
and factorization, then @tueda can run polybench, for eg.Beta Was this translation helpful? Give feedback.
All reactions