Java Performance Myths
Performance myths about the Java platform abound, from the general “Java is slow”, to the more specific “reflection is slow”, “allocation is slow”, “synchronization is slow”, “garbage collection is slow”, etc. Many of these myths have their root in fact (in JDK 1.0, everything was slow); today, not only are many of these statements not true, but Java performance has surpassed that of C in many areas, such as memory management.
In this class, we'll look at some common Java performance myths, identify where they came from, and explore the platform changes that have rendered them no longer true. Many common performance hacks don't actually help, and some can seriously hurt performance. The result is that clean code that follows common usage patterns generally shows far better behavior on modern JVMs than code laden with tweaks designed to “help” the JIT or garbage collector. More often than not, this well-intentioned assistance has the unfortunate effect of undermining many common JIT optimizations, resulting in slower – not faster – code.
About Glenn Vanderburg
Glenn Vanderburg is a principal at Relevance, where he is focused on cutting-edge software development technologies and techniques. He brings more than 20 years of experience developing software across a wide range of domains, and using a variety of tools and technologies. Glenn is always searching for ways to improve the state of software development, and was an early adopter and proponent of Ruby, Rails, and agile practices.
More About Glenn »