I threw together a quick JMH benchmark which shows that the iterator
is completely optimized out (results at bottom):

https://pastebin.com/eS7GbmNx

I take this as a demonstration of a more general principle, which is
that basic patterns in Java programming (e.g. virtual method calls,
object creation) tend to be extremely heavily optimized at runtime,
and avoiding them as a matter of principle is usually
counterproductive.

On Sun, Nov 25, 2018 at 9:30 AM Oleg Kalnichevski <ol...@apache.org> wrote:
>
> I do not need to provide anything. If there is no intermediate garbage,
> there is no GC overhead. It is that simple.
>
> Oleg
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to