News for hackers. Stuff that matters.
Re:Performance of modern Java on data-heavy workloads by stu2010 on Tuesday June 09, 2020 @09:36AM (#23466521)
Everything is a trade-off. Immutable objects enables easier safety when having multiple threads do work concurrently. Shared mutable state is still very difficult to do correctly, and at the point where you're introducing locks then you've crippled performance.

We have so many cores now that it tends to be a positive trade-off to have many threads doing some wasteful work (copies, extra GC pressure, potentially multiple threads duplicating the same work) than trying to have a perfectly optimized single thread.

Re:Performance of modern Java on data-heavy workloads by ThrowawayR2 on Tuesday June 09, 2020 @07:54PM (#23472344)
We have many cores now but memory bandwidth isn't rising as fast. That still makes immutable objects an increasing net loss.

It's just a bad idea.