collect() eats fractions

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Sat Apr 14 20:05:35 CEST 2001


On Sat, 14 Apr 2001, Richard B. Kreckel got some nervous twitch in his
left hand and sent an unfinished email to innocent ginac-devel subscribers:
> A couple of hours ago, I wrote:
> [...]
> > > Btw, I have noticed that you use frequently
> > > 
> > >    for (int n=this->ldegree(s); n<=this->degree(s); n++)
> > > 
> > > instead of more efficient
> > > 
> > >    for (int n=this->ldegree(s), m=this->degree(s); n<=m; ++n)
> > > 
> > > that saves repeated calling of the degree() method.
> > 
> > Indeed, it does.  But where else besides in basic::collect() do you see
> > occurences of this?

No, it does not safe calls.  Please look at the assembler output, maybe
after stripping off all unessential stuff, since it tends to be quite
longish!

Regards
    -richy.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list