One of the setting that might affect what you are describing is the setting of "Block reduction" and "Condition input branch execution". Both settings can be found in Simulation target \ Advance parameters.
Also, changing the optimization level will do the following:
Configure code generation settings for debugging.
Balanced with Readability
Apply code generation optimizations that balance RAM efficiency and execution speed with the readability of the generated code. For example, selecting this value disables optimizations that cross atomic subsystem boundaries.
Configure code generation settings based on your code efficiency objectives. Choosing this setting enables the Priority parameter. Set the Priority parameter to one of these values:
- Balance RAM and speed (default setting)
- Maximum execution speed
- Minimize RAM