Time and Space
This chapter examines the assembly code produced when compiling a C program, with a particular focus on the time of execution and the amount of flash memory occupied by the program. The core timer is introduced as a convenient tool for timing code. Examining the assembly code emitted by the compiler allows comparison of the efficiency of different code that performs the same function, as well as a comparison of code compiled with and without optimizations. The role of the prefetch cache module in maximizing program execution speed is also explored. The chapter concludes with an examination of map files, which indicate the amount of flash memory and global data RAM used by a program. This also reinforces the ...
Get Embedded Computing and Mechatronics with the PIC32 Microcontroller 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.