Performance improvement for many macro refs