Speedup by calling Buffer.concat less often.