This pragma optimizes all subsequent functions for speed, performing optimizations to reduce execution time at the expense of a possible increase in image size.
Usage
To optimize all subsequent functions for execution time, use #pragma Otime. For example, when compiling with armcc -Ospace (the default):
void function1(void){
... // Optimized for code size (from armcc -Ospace)
}
#pragma Otime
void function2(void){
... // Optimized for execution time
}
void function3(void){
... // Optimized for execution time
}
To optimize an individual function for execution time, use #pragma Otime together with #pragma
push and #pragma pop. For example, when
compiling with armcc -Ospace (the default):
void function1(void){
... // Optimized for code size (from armcc -Ospace)
}
#pragma push
#pragma Otime
void function2(void){
... // Optimized for execution time
}
#pragma pop
void function3(void){
... // Optimized for code size (from armcc -Ospace)
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.