netlhx 发表于 2015-7-28 17:06:11

stary666 发表于 2015-7-28 13:43
看看,,,,,,,,,,,,

:lol

Mandelbrot_Set 发表于 2015-7-28 17:13:59

netlhx 发表于 2015-7-28 17:06
多谢,能否再解释一句

参考手册(compiler user guide)吧:

#pragma Ospace


ARM Compiler toolchain v4.1 for µVision Compiler Reference

Home > Compiler-specific Features > Pragmas > #pragma Ospace

#pragma Ospace


This pragma instructs the compiler to perform optimizations to reduce image size at the expense of a possible increase in execution time.
Usage


This pragma enables you to assign optimization goals to individual functions.


Restriction


The pragma must be placed outside the function.

#pragma Onum

ARM Compiler toolchain v4.1 for µVision Compiler Reference

Home > Compiler-specific Features > Pragmas > #pragma Onum


#pragma Onum


This pragma changes the optimization level.
Syntax


#pragma OnumWhere:
numis the new optimization level.
The value of num is 0, 1, 2 or 3.




Usage


This pragma enables you to assign optimization levels to individual functions.


Restriction


The pragma must be placed outside the function.
#pragma Otime

ARM Compiler toolchain v4.1 for µVision Compiler Reference

Home > Compiler-specific Features > Pragmas > #pragma Otime


#pragma Otime


This pragma instructs the compiler to perform optimizations to reduce execution time at the expense of a possible increase in image size.
Usage


This pragma enables you to assign optimization goals to individual functions.


Restriction


The pragma must be placed outside the function.



#pragma push

ARM Compiler toolchain v4.1 for µVision Compiler Reference

Home > Compiler-specific Features > Pragmas > #pragma push


#pragma push


This pragma saves the current pragma state.
#pragma pop

ARM Compiler toolchain v4.1 for µVision Compiler Reference

Home > Compiler-specific Features > Pragmas > #pragma pop


#pragma pop


This pragma restores the previously saved pragma state.








Mandelbrot_Set 发表于 2015-7-28 17:15:17

ctrl+C 效果那么差 :L:L:L

netlhx 发表于 2015-7-28 17:19:41

Mandelbrot_Set 发表于 2015-7-28 17:13
参考手册(compiler user guide)吧:

#pragma Ospace


明白了,非常感谢啊

yanhaijian 发表于 2015-7-28 18:11:49

大家都在向高端发展了。

stary666 发表于 2015-7-29 12:15:34

学习一下,,,
页: 1 [2]
查看完整版本: MDK代码优化