Known Slugs

Learn how some C functions can slow down your program.

We'll cover the following...

Slow math functions

There are some C functions that are known to be slow such as the pow and sqrt functions and the trigonometric functions (e.g., sin, cos, tan, etc.). These can be accessed by including the math.h header file.

However, in some cases, we can use faster alternatives. For example, instead of using the function pow with integers, like this: