Hello again,
after some excellent feedback, I have changed the EmptyStream
implementation to contain state. This means we don't get the object
allocation down to zero, but it is very close thanks to escape analysis.
The speedup is impressive. For an empty ArrayList, we get the following
impro
Good evening,
a couple of months ago a fellow Java Champion told me that he had
"banned" streams at his company, or at least discouraged their use. The
reason was their high allocation rates with empty collections. With
traditional for loops, if the collection is empty, then hardly any
object