You quoted me, and then didn't follow my lead. "But if you do this a lot of times, you're kissing inefficiency on its ratty lips."
You performed these tests ONCE each. Use the first() function several times. Scan through the array several times. Create the hash ONCE, and use exists() many times.