slight speed improvement

by yielding in batches (so yield has non-negl overhead)