Does if() inside update() decrease performance?

Hello. I know that update() runs every frame, but is there a significant decrease in performance when an if() statement runs inside an update as well?

For example, if I have a boolean that controls whether the player can move and shoot:

function Update() {
    if(canMoveNShoot) {
        WASD = moving;
        Click&Clack = shooting;
    }
}

Is this the right way of enabling/disabling stuff, or is there another, better way?

All code that runs decreases performance to some degree or other, but a single boolean check is trivial compared to the cost of the Update function call itself. It would be better not to call Update at all if you don’t need it, so you can disable the script instead, which causes Update and similar functions to stop running, but all other functions will still work (OnCollisionEnter etc. etc.).