oldk1331 wrote:
> 
> https://github.com/oldk1332/fricas/commit/11f78720948a0581efd729bb12d379d5dd6b06a9.patch
> 
> make pseudoRemainder generic
> 
> 
> https://github.com/oldk1332/fricas/commit/2a9371fd5aeb1086f9e9604a7ae1440aa0fe5f7e.patch
> 
> move pseudoRemainder to UPOLYC
> 
> 
> https://github.com/oldk1332/fricas/commit/e2debd27d3fe2ac1a49011b632e8e5e3130adc8a.patch
> 
> merge pseudoDivide, use the one from PRS
> 
> 30% faster than UPOLYC (3.2s vs 4.2s)
> 200% faster than NSUP  (3.2s vs 9.9s)
> and fix a bug in NSUP: it used to return lcQ instead of lcQ^i


Hmm, how you measuer this?  Using the following script:

f := (x^4 - 1)::SUP(INT)
g := (2*x^2 - 1)::SUP(INT)

ts_rem(f, g, n) ==
    [pseudoRemainder(f, g) for i in 1..n]

ts_div(f, g, n) ==
    [pseudoDivide(f, g) for i in 1..n]

and

)set messages time on
ts_rem(f, g, 500000);
ts_div(f, g, 500000);

each repeated few times I get that new pseudoremainder is sligtly
slower and new pseudoDivide is slightly faster.  Concerning
'pseudoRemainder' AFAICS real computations in both versions
are the same, but overhead in version from SUP is smaller
(generic version has several SPADCALL-s which in SUP are
replaced by inline code).  Concerning  'pseudoDivide': the
methods differ so there may be different result.  At first
glance I would expect version from NSUP (after fixing bugs)
to be the fastest one and the current generic one to be slowest.
Your version looks intermediate.

There is also another issue: if some coefficient mathematically
should be 0 then it is good to make it zero without calculation.
This helps if we want to reuse routine for say floating point
computations.  AFAICS your 'pseudoDivide' does not have this
property. Version from NSUP uses 'fmecg' which should ensure
this.

-- 
                              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.

Reply via email to