In this chapter, how to make the uppercase routine more efficient is discussed. This includes design patterns for more efficient conditional statements. Optimizing code often involves thinking outside the box and going beyond finding ways to remove one or two instructions in a loop, often involving a major algorithmic change. Then several further common optimization techniques are listed, but first, a trick to simplify the main if statement will be given.
12. Optimizing Code
Get RISC-V Assembly Language Programming: Unlock the Power of the RISC-V Instruction Set now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.