reduce allocation by updating a buffer held by the iterator