Depends on what the goals are. If, as you hypothethized, the goal is to
minimize function calls, then the one that minimizes function calls is
clearly "better". If that's not an issue, and the goal is the fastest,
then obviously the fastest one is "better". And there could be more
idiosyncratic goals relating to ease of coding or ease of understanding
for particular user(s), etc.
I asked only because I had picked up the impression, perhaps
erroneously, that fewer function calls was inherently better; but you
hadn't mentioned speed in this case as a reason for the "tighter"
version, so I began to wonder. If my impression *is* erroneous, then I
will view differently in the future alternatives whose only claim to
fame is fewer function calls.
Alan Beban