Developer Forums | About Us | Site Map
Search  
HOME > TUTORIALS > SERVER SIDE CODING > JAVA TUTORIALS > JAVA THEORY AND PRACTICE: GARBAGE COLLECTION AND PERFORMANCE


Sponsors





Useful Lists

Web Host
site hosted by netplex

Online Manuals

Java theory and practice: Garbage collection and performance
By Brian Goetz - 2004-03-03 Page:  1 2 3 4 5 6

Writing garbage collection-friendly classes

The past two installments of Java theory and practice have discussed various techniques for garbage collection and the basics of the JDK 1.4.1 garbage collectors. This month, columnist Brian Goetz looks at the performance impact of the choice of collector, how various coding idioms interact with the garbage collector, and how allocation and other related costs have changed in Java virtual machines over the past several years.

In the early days of Java technology, allocating objects got a pretty bad rap. There were lots of articles (including some by this author) advising developers to avoid creating temporary objects unnecessarily because allocation (and the corresponding garbage-collection overhead) was expensive. While this used to be good advice (in situations where performance was significant), it is no longer generally applicable to all but the most performance-critical situations.



View Java theory and practice: Garbage collection and performance Discussion

Page:  1 2 3 4 5 6 Next Page: How expensive is allocation?

First published by IBM developerWorks


Copyright 2004-2017 GrindingGears.com. All rights reserved.
Article copyright and all rights retained by the author.