Alternative ways to code 'conditional functions'?

When a program requires frequent tests in the loop(), there seem to be two ways of doing so, both which work. Are the following equally efficient and acceptable? Or is one 'best practice'?

This:

void loop()
{
  xyz();
  // Other commands in loop()
}

void xyz()
{
  // Frequently check for condition, e.g.
  if (abc == def)
  {
    // function commands
  }
}

Or this:

void loop()
{
  // Frequently check for condition, e.g.
  if (abc == def)
  {
    xyz();
  }
  // Other commands in loop()
}

void xyz()
{
  // function commands
}

They are both acceptable and you can use either.
In the first case, your loop function will be cleaner and easier to understand, the second option is executed a little faster.

If xyz is only used in one place the compiler will likely inline the code.

Do what is easier to read, you may have to come back to it.

Wow, that was quick! Thanks both, understood.

Then the test inside the function is preferable if the test may be extended later. Instead the test in loop() can better reflect global conditions, independent from the implementation in the function.

void loop() {
  if (function_allowed) abc();
}

void abc() {
  if (condition_met) ...
  else if (other_condition) ...
}

The programming depends on the structure and thus the logical dependency of the variables in the sketch.

There may be a very minor performance difference:

In the first case, there will be a function call and an if on every single interation;
In the second case, there will only be the if in cases where abc != def

Highly unlikely to be significant.

And, as @GoForSmoke said, the call may well be inlined anyhow ...