3 ms·
Yes - the cache example is bad; my point is the general idea of avoiding branches that merge back into the main function. In your example above, the branch doe
by jakewins 8y ago
Yes - the cache example is bad; my point is the general idea of avoiding branches that merge back into the main function.
In your example above, the branch does merge back, and clearly that's fine for a small function - and common pattern - like this. But the general idea would be to avoid it if possible, because that removes unnecessary complexity.