代码效率权衡
通过删除执行次正规数值计算的代码或防止仿真与代码生成结果可能不匹配的保护措施,可以提高生成的代码的效率。
主题
- Remove Code for Out-of-Range Floating Point to Integer Conversions
If the input values in your application are in the range of the output type, remove code for out-of-range floating-point to integer conversions.
- Remove Code That Maps NaN to Integer Zero
If input values of
NaN
do not exist in your application, specify that the code generator remove code that mapsNaN
to integer zero. - Disable Nonfinite Checks or Inlining for Math Functions
Use code replacement library (CRL) customization entries to selectively disable nonfinite checks for math functions and inlining of math functions.
- Subnormal Number Execution Speed
Minimize the possibility of execution slowdowns or overruns due to subnormal number calculation latency.
- Remove Code That Guards Against Division Exceptions for Integers and Fixed-Point Data
Optimize the generated code by removing code that protects against division by zero and overflows in division
INT_MIN/-1
operations for integers and fixed-point data. - Remove Code from Tunable Parameter Expressions That Saturate Against Integer Overflow
Remove code that prevents integer overflow of tunable expression parameters for efficiency benefits.