There is a good book about performance "Java Performance Tuning" by Jack Shirazi. The whole chapter is devoted to object creation. This is what "Object creation statistics" section said:
"For example, on a medium Pentium II, with heap space pregrown so that garbage collection does not have to kick in, you can get around half a million to a million simple objects created per second. If the objects are very simple, even more can be garbage-collected in one second. On the other hand, if the objects are complex, with references to other objects, and include arrays (like Vector and StringBuffer) and nonminimal constructors, the statistics plummet to less than a quarter of a million created per second, and garbage collection can drop way down to below 100,000 objects per second."
[Just found that this chapter is available online
http://www.ora.com/catalog/javapt/chapter/ch04.html ]
James W. Cooper "Is Java fast enough?" in his article in JavaPro quotes experiment when the same computations were performed in "Fortran-style" and "Object-oriented style" and statistics shows that "object-orientation slows processing by a factor of 10-20".
http://www.fawcette.com/javapro/2002_03/magazine/columns/javatecture/default_pf.asp However, for most applications even performance degradation by a factor of 10-20 is perfectly acceptable. Readability and maintainability of code is what really matters.
Finally, there is a simple technique you can use to calculate any statistics you want:
(Real Truth can be more complex than that, because GC can interrupt object creation cycle if too many are created, or compiler can perform some smart optimizations etc., but as a general technique this should work)
[ July 28, 2002: Message edited by: Mapraputa Is ]