Hello,

Is there an already implemented way to count the number of Spad
function calls needed to compute a more general computation? I could
add a global counter to a routine/macro like spadcall or something
like that, but I am wondering if this was already done? I don't think
it is simple. I have seen in the code some comments about this but I
do not know how to do it exactly. As an illustration, in the Complex(R
: CommutativeRing) domain there is this comment:

       Ops ==>
           x + y == [x.real + y.real, x.imag + y.imag]
                           -- by re-defining this here, we save 5 fn calls
           x - y == [x.real - y.real, x.imag - y.imag]
           x : % * y : % ==
               [x.real * y.real - x.imag * y.imag,
                x.imag * y.real + y.imag * x.real] -- here we save nine!

       if R is DoubleFloat then
           -- we inline from DoubleFloat here
           Ops
       else
           -- general case
           Ops
- Greg

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dbZpQXkvu3m%3DDuJrsc-03-67yEywfCY6iDE%2B-KfXCYiGA%40mail.gmail.com.

Reply via email to