I don't see any efficiency problems. You only need to scan when the faction list changes otherwise you just use a cache. In most play sessions this is one iteration of the faction list and a simple hash table lookup when you need the information.
There's a babble library for this though.
http://www.wowace.com/addons/libbabble-faction-3-0/