unigram frequency-based prioritisation of frontier, plus memoisation of unigram frequencies when sorting