3 ms·
Yes I would advocate for the maintenance of both expressions if the comparison is tricky If this is a hot path that must absolutely be optimized then a comme
by raverbashing 10y ago
Yes
I would advocate for the maintenance of both expressions if the comparison is tricky
If this is a hot path that must absolutely be optimized then a comment explaining the conditions is needed
And of course, the != 2 question might change (either because of a bug or logic change) but the == 1 might still be valid, however, if you took the first one your change will break the code