Live data from Hacker News

Performance Impact of Functional Programming in Java

beyondjava.net

1–2 of 2 posts

Re: Performance Impact of Functional Programming in Java

#2
> Creating a new object is always expensive. Lambda functions are basically anonymous inner functions. So using a functional algorithm always creates zillions of objects, adding a lot of pressure on the garbage collector.

If that is true, it means to me, that the compiler is too stupid to transform the code into something, which does not create the same objects over and over again.