loading...

re: Keeping your code clean by sweeping out "if" statements VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just to add some clarification, this Map.of method returns an immutable map of defined size, so there’s not a great deal of heap allocation. Besid...
 

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'.

code of conduct - report abuse