I will try to be as clear as I can with my question (not easy...it's not that clear for me as well). Suppose you have a set of IF...THEN instructions with multiple operands, for example
IF ((a==0) && (b==1) && (c==1)) THEN x=1
ELSE IF ((a==0) && (b==0) && (c==1)) THEN x=2-
and so on
Suppose I could replace all those IFs with a single mathematical function like
x = a * n1 + b * n2 + c * n3
(this is just to give you an idea, in real it's more complex, but also the IFs and operands are many more)
The function comes from a previously trained artificial neural network.
My gut feeling is that when it comes to execution, the function should take lots less time than the IFs, but it's just a gut feeling that comes from my old background in assembly where they taught us that a conditional instruction takes way more time than an arithmetical one.
Can you confirm this? maybe even provide me some link where I could find an explanation?
Thank you in advance guys!