Recent articles:
Popular archives:
Java: A platform for platforms
Sun's reorg may seem promising to shareholders but it's also a scramble for position. The question now is whether Sun can,
or wants to, maintain its hold on Java technology. Especially with enterprise leaders like SpringSource and RedHat investing
heavily in Java's future as a platform for platforms
Also see:
Discuss: Tim Bray on 'What Sun Should Do'
May 20, 1999 -- Last month Sun introduced the Java HotSpot Performance Engine, a jumpstart technology for Sun's Java 2 platform that the company says will make conventional just-in-time compilers (JITs) a thing of the past. By using an "adaptive" compiler and new techniques for garbage collection and mutithreading, says Sun, HotSpot can improve application performance by up to 100 percent. Still, experts say those improvements aren't across the board, and HotSpot still lags when it comes to certain applications and hardware configurations. In other words, there are places where HotSpot is hot ... and places where it is not.
"HotSpot is a turbo-charger for the Java 2 platform," said Sun Java Software Division President Alan Baratz, speaking at the product's launch in Paris earlier this month. "It can improve performance of Java applications by two times and is blowing away the competition in speed and scalability benchmarks."
The key to HotSpot, says Sun, is adaptive optimization, which provides a significant performance gain over JVMs that use just-in-time compilers. A JIT translates Java bytecode into machine language on the fly, compiling methods only the first time they're executed and using the resulting machine code in subsequent method calls, rather than reinterpreting the bytecode. This enables a significant performance improvement over earlier Java platforms. But JITs have limitations. For example, complex graphics processing can slow things to a grinding halt.
HotSpot is Sun's solution to the problems experienced by JITs -- at least on the server side. HotSpot can optimize the performance of many server applications, like databases, that execute the same task again and again, using the same objects and calling the same methods. HotSpot identifies these code "hot spots" in a profiling process that begins when the application is launched and continues dynamically to identify the most frequently executed code and concentrate on compiling it. (For a more detailed explanation of this, see the "How compilers and interpreters work" section of Eric Armstrong's March 1998 JavaWorld article on HotSpot.)
In addition to dynamic compilation, HotSpot targets two other key areas instrumental in application performance. Sun estimates that 40 percent of hardware resources used by a typical Java application are devoted to multithreading (whereby multiple I/O data streams are handled simultaneously) and garbage collection (which frees memory space occupied by objects that are unlikely to be used again).
According to Sun, HotSpot improves on conventional garbage collection in several ways:
HotSpot also attempts to eliminate performance bottlenecks caused by multithreading. Sun claims the new technology incorporated into the performance engine can make "synchronization performance so fast that it is not a significant performance issue for the vast majority of real-world programs," according to one of the company's whitepapers.