Piranha is probably going to be rather slow for univariate and short polynomials

it has lots of overhead for those specific use cases

@bluescarni Which algorithms do you use for trigonometric series expansion in Piranha? Our new implementation is around 2x slower than Piranha's. We are wondering if the bottleneck is in our polynomial operations or our expansion algorithms.

@shivamvats piranha does not offer that type of capability directly (at least not yet), it just gives you some low-level primitives for working with multivariate polynomials

if I recall correctly @isuruf and @rwst were involved in the symengine series expansion work?

@shivamvats, @irislq, your conclusions in the wiki are wrong. Improving the series expansion code will improve both Piranha implementation and your implementation, although there won't be any change in Flint implementation as it uses Flint operations.

Slowdown is due to polynomial operations

Slowdown is due to polynomial operations

One bottleneck I can see is that, the polynomials are immutable in your implementation whereas Piranha is not

@isuruf Why would our polynomials being immutable cause a bottleneck?