This is one of the reasons that Value types as being discussed for java9 would be such a big benefit for easy performance.
You can do it today but it requires more work, that we often don't do.
Parts of the talk are slightly outdated but in practice most of this has not changed between java 1.2 and java 1.8.
Parts of the talk are slightly outdated but in practice most of this has not changed between java 1.2 and java 1.8.