DEV Community

Discussion on: Keeping your code clean by sweeping out "if" statements

Collapse
 
december1981 profile image
Stephen Brown

Fair points. I guess it also depends what you're trying to do.

If you're writing kernel code, or stuff for embedded systems, the issue of lots of branches can itself be an issue - from a performance point of view. Data oriented approaches might focus on removing branches in the first place by organising the layout of data and making the code run better by processing on 'chunks of stuff'.