oldk1331 wrote:
>
> https://github.com/oldk1332/fricas/commit/c2750e2de11ede9c82c6d773a549bd3f8e592593.patch
>
> The exquo code in SUP is same as PR, so I remove exquo
> from SUP.
>
> Also, I move "R has Approximate" inside exquo function,
> and change reverse to reverse!.
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.
Concerning movement of "R has Approximate": you are moving
code into hot path. When "R has Approximate" is outside
function it is computed once. In your case each execution
of 'exquo' will recomupute the condition. While the cost
is not huge, it may be significant: basically has test
searches list of categories which R satisfy. 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.
--
Waldek Hebisch
--
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.