|I'm trying to optimize some code that I've written and I've come across a style that I use ~20 or times that will be run ~100 or so times during the full execution of my code(a VSTO excel spreadsheet).
Here's the common syntax
If (complicated boolean statement)
form.attribute = true;
form.attribute = false;
I was wondering whether using something like this would make any difference
form.attribute = complicated boolean statement.
Could eliminating the if/else actually noticably speed up my code, or is this change so insignificant that I shoul concentrate on some of the other pieces of code to eliminate database calls and recomputation when it isn't necessary?