Skip to main content

For maximum efficiency, a good rule of thumb in an OR decision is to ____.?

For maximum efficiency, a good rule of thumb in an OR decision is to ____. irst ask the question that is more likely to be true first ask the question that is more likely to be false rewrite as an AND decision and ask the question more likely to be true rewrite as an AND decision and ask the question more likely to be false

3 Answers

J
Jace Toy DDS

Feb 20, 2025

Depends on the language. Many languages use short circuit evaluation so you could pick up some efficiency -- but typically the compiler is smart enough to perform such an optimization for you.... Show More
J
Jace Toy DDS

Feb 20, 2025

If you first ask the question that is more likely to be true then you're less likely to even need to ask any more questions.Eg.A true 80 percentB true 50 percentIf you ask B first then there are more times in which you'd need to ask A.Another,Let's say you want the value of R whereR = A or B or C or...most languages evaluate this left to right. If you evaluate A and it's true the R is true regardless of the values of the other variables. In fact, some language don't even evaluate the other variables.... Show More
J
Jace Toy DDS

Feb 20, 2025

first ask the question that is more likely to be true... Show More

Want to answer this question?

Join our community to share your knowledge!

Categories

Tags

Related Questions

3
For the following chemical reaction HCN (aq) + KOH (aq) = H2O (l) + KCN (aq) Write the net ionic equation, inc?

For the following chemical reaction HCN (aq) + KOH (aq) = H2O (l) + KCN (aq)Write the net ionic equation, including the...

1
For the reaction 2 NH3 + CH3OH ! products , how much CH3OH is needed to react with 93.5 g of NH3?

Can someone please explain how to solve the problem.The multiple choice answers are as followed:46.8 mol88.1 mol 2.75 mo...

7
For those I love I will sacrifice..?

I seen this as a tattoo quote, What exactly does this mean?

2
For those of you who asked if Diana Ross had any Plastic Surgery?

The answer is yes, she only had ʙʀᴇᴀsт Implants done in 1990, and nothing else...for those of you that said lots-Learn a...

3
For which accomplishment was king lalibela of Ethiopia most famous A. keeping ancient language of the aksum B. establishment of the

For which accomplishment was king lalibela of Ethiopia most famous A. keeping ancient language of the aksum B. establish...

10
For which fictionalized story would this passage be most appropriate as source material

For which fictionalized story would this passage be most appropriate as source material

1
For which of the following reactions is ΔH∘rxn equal to ΔH∘f of the product(s)?

For which of the following reactions is ΔH∘rxn equal to ΔH∘f of the product(s)?You do not need to look up any values to...

4
For which of the following reactions is the ratio kp/kc largest at 300 k?

For which of the following reactions is the ratio kp/kc largest at 300 k?

2
Force between an Infinitely Long Wire and a Square Loop?

A square loop of wire with side length a carries a current I_1. The center of the loop is located a distance d from an i...