perf(library/unifier): add small performance improvement

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
perf(library/unifier): add small performance improvement