Friday, July 9, 2010

The cost of object orientation: an update

Back in March, an article was added to the site on the performance cost of object orientation which showed that on a test system, "hand-cranking" computationally expensive complex number calculations to avoid the use of encapsulating objects gave a notable performance benefit. The results also showed, however, that the benefit of using mutable objects was limited.

In some work I've been doing more recently on a wider range of test machines and versions of Hotspot, at appears that this effect is not universal: on at least some systems, there is a benefit from using mutable rather than immutable objects. More details will be posted to the site in due course.