Small compiler performance improvement when saving entity references