The argument should have no side effects, so no trouble due to this.
Concerning "performance critical", this code _should_ be performance
critical. ATM slowness in other parts masks this, but I do not
want to slow down it.
BTW1: Concerning "correctness", at Boot and Lisp level some people
took care in some helper functions to handle "all cases". That
is wrong concern, helper functions should handle all that is
needed and no more (preferably signal errors on unhandled data).
And use should be limited/regular to avoid (if possible)
various special cases. The case you found is a bit different,
but not too much: while we use side effects in arguments when
needed, code which does not use them is clearer, so they should
be discouraged when not strictly needed. And there is a handful
of uses to the involved macros and _none_ of the uses would
benefit from side effects.
BTW2: eventually involved code (that is Spad scanner) is going to be
completely rewritten. Changes make sense when they fix actual
problems, but otherwise I see no need for changes: code is
reasonably clear and works OK.
--
Waldek Hebisch