Known Slugs

This lesson deals with functions which make your C program slower.

We'll cover the following

There are some C functions that are known to be slow.

Slow math functions

pow(), sqrt(), and trigonometric functions (e.g. sin(), cos(), tan(), etc.

When using pow() with integers, just use basic operators instead. For example instead of this:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy