|
Re: speed of math.h trig functions?
Jared,
I remember from an earlier version of the compiler (2.2?) that the compiler library source code had estimates of the number of clock cycles for a particular operation to complete. I don't see this information in the current compiler, but I do remember that a floating point multiply/divide statement took an average of 1835 instruction clock cycles (a floating point addition/subtraction was 80). Assuming this information is still semi-valid, you can take a look at the source code for the trig routines in the "C:\mcc18\src\traditional\stdclib" directory to get an estimate of how many of these operations there are for a particular trig routine. Sorry I can't give you any more info than that.
Mike
|