> You're putting too much thought into this ;-)

I know! I'm partly aware of it when I do it... but I still can't help myself. Annoying. You could say being able to resist these urges is part of the discipline of efficient coding. I still have a ways to go.

I think I'm just used to C's "true == 1, false == 0" convention, so I don't really notice that there is no logical xor operator. I usually try not to rely on JS's "truthiness" semantics, but I make an exception for automatic boolean-to-integer conversions. Or null-to-boolean. Or actually, wherever it matches C's behavior.

I decided to go with a variation of the simple solution since code that doesn't need explanation is better, all things being equal. And the benchmarks seem to say it's pretty much equal.

That doesn't mean I might not use an xor somewhere else, but only if it's too awkward to do it differently. This situation felt borderline, but in the end, xor is probably not considered lingua franca, so it's probably better to stick with the "RISC" subset of developer-speak if possible.