Is there a package for "simple" polynomials?


I recently implemented some multivariate polynomials with R & C++ and I observed this implementation is faster than my Julia implementation. But in Julia I use TypedPolynomials.jl (or a related package, don’t remember) which allows much more, e.g. symbolic coefficients. So the comparison makes no sense somehow.

Thus I think it would be worth to implement my method in Julia. But I don’t want to reinvent the wheel: does there already exist a package for “simple” multivariate polynomials, faster than TypedPolynomials.jl and related packages? I mean polynomials with numerical coefficients only (double or rational).

If you are using TypedPolynomials presumably you’ve seen the readme of MultivariatePolynomials:

which mentiones FixedPolynomials for “fast evaluation of multivariate polynomials”?

To get better responses you’ll probably have to provide a bit of an MWE in Julia and R/C++ of what exactly it is you are trying to do.

1 Like

Thanks, will take a look.

This is for my package JackPolynomials.jl.

You might also have a look at GitHub - jmichel7/PuiseuxPolynomials.jl: Multivariate (Puiseux) polynomials and rational fractions

1 Like


FixedPolynomials will change nothing because it is for fast evaluation and what I want is the fast construction of a polynomial, not evaluation.

That’s sort of the point I made above: it’s probably most helpful if you show what you are doing in R and what you have tried to do the same in Julia (say using TypedPolynomials of FixedPolynomials) together with a benchmark, so that people can make more concrete suggestions.

I gave the link to my package.

My method (not mine originally I should mention) is simple: a polynomial is represented by a dictionary mapping a vector of exponents to the coefficient of the corresponding term.