Small perf improvement

Gained 13 ms (26%) of CPU time when generating chunks. Not much, but there's no small improvement, right?