Function inlining between MathWorks functions
Control inlining for calls from MathWorks functions to other MathWorks functions
Since R2025a
Model Configuration Pane: Code Generation / Optimization
Description
Inlining behavior at all call sites where a MathWorks® function calls another MathWorks function.
The code generator can disregard this setting in some cases, even if you select
Always or Never. If there is a conflict between
this parameter setting and a coder.inline directive in the function
body, the coder.inline directive overrides the parameter setting. For
more information, see Control Inlining to Fine-Tune Performance and Readability of Generated Code.
Settings
Speed
(default) |
Never
|
Readability
|
Always
-
Speed Use internal heuristics to determine whether to perform inlining at a call site. This setting usually leads to highly optimized code.
-
Never Never inline function calls. This setting results in maximum readability and can significantly reduce the performance of the generated code.
-
Readability Almost never inline function calls, except for calls to very small functions. This preserves code modularity and prioritizes readability over execution speed.
-
Always Always perform inlining at a call site.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging |
Readability
|
| Traceability |
Readability
|
| Efficiency |
Speed and Always
|
| Safety precaution | No Impact |
Programmatic Use
Parameter:
InlineBetweenMathWorksFunctions
|
| Type: character vector |
Values:
'Speed' | 'Never' |
'Readability' | 'Always' | |
Default:
Speed
|
Version History
Introduced in R2025a