fvisagie
22nd August 2009, 13:28
Hi All,
Say one has a complex conditional expression like:
result = expression0 || (expression1 && (expression2 || expression3)) ? expression4 : expression5
What sequence of steps would AVS follow if expression0 is true? At what point would it decide to go ahead and evaluate expression4 - would expression0-3 all get evaluated first, or would AVS bail out after determining that the top node is an OR and the left-hand expression is true?
I'm trying to establish if (other than through optimised logic) some speed efficiency can be obtained here by moving expressions that are really expensive to evaluate to a position where their evaluation will seldom be required?
Many thanks,
Francois
Say one has a complex conditional expression like:
result = expression0 || (expression1 && (expression2 || expression3)) ? expression4 : expression5
What sequence of steps would AVS follow if expression0 is true? At what point would it decide to go ahead and evaluate expression4 - would expression0-3 all get evaluated first, or would AVS bail out after determining that the top node is an OR and the left-hand expression is true?
I'm trying to establish if (other than through optimised logic) some speed efficiency can be obtained here by moving expressions that are really expensive to evaluate to a position where their evaluation will seldom be required?
Many thanks,
Francois