What is the memory and performance usage compared to creating a object with only a constructor?
The usage here is in creating a Set<Object>
or List<Object>
that may contain million plus entries and I am concerned with the overhead of using Bloch's Builder Pattern. I have used it in the past, but never in this large of a scope.
Reference: Item 2: Consider a builder when faced with many constructor parameters, reprinted in Creating and Destroying Java Objects: Part 1, excerpted from Effective Java Second Edition by Joshua Bloch.