buffer: iterator optimization