Is /testfor more efficient
You definitely don't need to be using testfor
here. The only reason you might want to use testfor
before conditionally running something like effect
is if you wanted to test for something that can't be tested in a selector, i.e. NBT data, and even then, that would be such a narrow case that you're better off putting that test in a scoreboard. Since you're applying the effect
against a selector already, the testfor
is basically doing nothing for you; either the testfor
succeeds and you run 2 commands, or it fails and you run only 1, whereas without it, you run 1 command, or half a command. If you don't have a lot of commands, you're not going to see a performance difference though.
But this belies another issue, which is testfor
is only marginally useful right now, but will be going away in 1.13, replaced with a new and improved execute
command.
In the end though, my rule of thumb is to only use testfor
if it results in the fewest command blocks, and almost never if chained conditional command blocks target players (or entities in general) instead of the world.