In this chapter, we will learn how to speed up the execution of any C program. We will learn to keep the frequently used content in CPU registers, and we will learn how to take input faster from the user. We will also learn to apply loop unrolling in C programs.
The following are the recipes we will work through in this chapter:
- Using the register keyword in C code for better efficiency
- Taking input faster in C
- Applying loop unrolling for faster results
Let's begin with the first recipe.