is the process of checking if a boolean is true then setting it to false faster than just setting it to false without checking its state ?

as the question states , i would like to know if it is faster to just set a boolean to false whether or not it is true of false , or is checking if the bool is true then setting it to false; faster ?

and over time with an accumulation if objects referencing the bool with it still be the fastest method ?

if(myBool) // I need to check if the boolean is true before assigning a new value to it, first step.
myBool = false; // Now assigning it a value, second step.

myBool = true;  //  Just assigning its value without a check only takes 1 step.

Checking the variable first introduces another step of complexity to it. Just assigning its value without checking is faster.

I doubt you would see any marked improvement in performance if you stopped checking a simple data type such as a boolean, infact it would probably hurt your code if you stopped checking what data is being held in your variables.

assigning is faster