in reply to How to Order an Array's Elements to Match Another Array's Element Order
It's just "Tim Toady the Time Waster." Get to one way that's reasonably clear and that you can verify works properly ... then, stop. If and only if subsequent profiling reveals the logic to be a "hot spot," revisit it again. We have long since passed the time when we actually needed to "bum code" to squeeze out a few more precious milliseconds. If either one of your OP points fit that criteria, select one and move along.