Tweak your IO performance for faster runtime

Increase the speed of Java programs by tuning IO performance

1 2 Page 2
Page 2 of 2
  • For 1.1 Java VMs, that simple optimization yields a desirable improvement in runtime -- between 25 and 45 percent. The last row shows that the temporary String creation accounted for 60 to 90 percent of the incremental time between programs A and B. As with other tests, the IBM 1.1 Java VM ran faster than the Sun 1.1 Java VM.
  • For the 1.2 and 1.3 Java VMs, the difference between the two versions was less significant -- 10 to 25 percent -- as was the percentage of time expended in temporary String creation. That observation suggests that those newer Java VMs are indeed becoming faster at instantiating objects, but you should still pay attention to the performance impact of excessive object creations.
  • The 1.3 Java VMs run much faster than the 1.1 or 1.2 Java VMs for tasks similar to that one, which creates many small objects.


Performance tuning is an iterative process. It pays to begin gathering performance data early in development so that you can identify and fix performance hot spots early. You can often make dramatic improvements in application performance through relatively simple enhancements such as adding buffering to IO, or using byte instead of char in appropriate situations. In addition, performance varies substantially from VM to VM. Simply switching to a faster Java VM may bring you significantly closer to your performance goal with minimal effort.

Brian Goetz is a professional software developer with over 15 years of experience. He is a principal consultant at Quiotix, a software development and consulting firm located in Los Altos, Calif.

Learn more about this topic

1 2 Page 2
Page 2 of 2