> Have you looked at performance impact? In SUP exponents > are NonNegativeInteger and normally Spad compiler is > able to optimize based on that. In this case it can > not, but a different code should be optimizable.
For the SUP case, the differencec is little: I tested with x : SUP(INT) := reduce(+,[monomial(random i, i)$SUP(INT) for i in 1..1600]); y : SUP(INT) := reduce(+,[monomial(random i, i)$SUP(INT) for i in 1..1600]); z:=x*y; )time on z exquo x; -- run a few times )co poly z exquo x; -- run a few times Before and after patch, both time is around 0.15s. > My guestimate > is that this list has about 20 elements. For polynomials > having less than 20 terms the 'p1 = p2' test is > likely to be cheaper than the has test. I then tested with polynomials with 16 elements: x : SUP(INT) := reduce(+,[monomial(random i, i)$SUP(INT) for i in 1..16]); y : SUP(INT) := reduce(+,[monomial(random i, i)$SUP(INT) for i in 1..16]); z:=x*y; )time on [z exquo x for t in 1..10000]; -- run a few times )co poly [z exquo x for t in 1..10000]; -- run a few times Before patch it's 0.15~0.19s, after it's 0.16~0.22s. So it may have a impact on smaller polynomials. So remove exquo from SUP but don't inline "R has Approximate" then. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
