Hi all,
Well I am quite happy to report that after exhaustive testing, my team is adopted ArrayLists from the java.util/Collections APIs for container functionality in final core game engine classes.
Previous testing on several Collection classes has shown less than please results WRT performance, class size and extraneous garbage collection.
It seems 1.4.2 gc is really handling Collection issues well, so well in fact that we are slowly adopting in more as we see fit. With this adoption, Java 1.5 will also be able to take advantage of the new “for” syntax and run-time benefits.
For us, this is a significant change, as in the past we have publicly “denounced” the Collections APIs in PRODUCTION level game code. For tools and prototyping fine, but high performance, very controlled per frame code, no. With the latest VM (on Windows at least), we can found ArrayLists to be of production level quality when needing a growable/dynamic sized list.
Last years GDC presentation on this topic yielded some interesting (heated) floor discussion about Collections and GCing. In the end, we still did not endorse them. However, this year we will endorse a growing sub-set as testing progresses.
For many of you, this probably means squat as you either didn’t care, or were already convinced on using Collections. For those who weren’t (read C game developers reviewing Java) our position is that it is now an option.