quote:Original post by Miserable
The people who wrote your compiler presumably used the best and most efficient way available.
This generalization is not right in all situations. Most notably the stock compiler implementation of rand() is notoriously poor, even in otherwise good compilers'' C libraries. I don''t know about fabs() in particular (though I would assume your generalization does indeed hold), but applying this statement to the whole of the C library can lead to trouble.
quote:Original post by Miserable
Finally, remember that premature optimisation is the root of all evil.
I couldn''t agree with this more. Before even thinking about optimizing at such a small level, run a profiler on your code to see where the optimizations are needed.
GG