E.g. do I need to extract
bool xIsNull = x == null
from the loop where I check x == null
?
As I know if (a == tr
Do not concern yourself with microoptimizations. Whichever one is "fastest" will undoubtedly have zero effect on your web app. Use whichever is clearest for you and other programmers to read.
Unless you have measured and found that there is a problem with your code, and you know exactly where in the code is being slow, you are wasting your time.
Programmer time is many orders of magnitude more expensive than computer time.