Performance tweak to __generator