Practical guidelines for boosting Java server performance
Reinhard Klemm · 1999
As Java technology matures, an increasing number of applications that have traditionally been the domain of languages such as C++ are implemented in Java.Many of these applications such as Internet servers demand high execution speed.Currently, it is mostly the programmer's responsibility to optimize Java code for speed.This paper presents several simple yet effective source code-level guidelines for accelerating Java programs.Among the performance enhancing rules described in the paper are object reuse, avoiding Java API methods with implicit object allocations, statically creating immutable objects, thread pooling, and avoiding dynamically expanding objects.All these rules aim at reducing the frequency of object allocations and objectto-object copy operations.Using examples, the paper demonstrates up to 15-fold accelerations by using these guidelines.When applied under the appropriate circumstances explained in the paper, none of the rules leads to performance penalties. Pmkionto make digital or hard copies of all or part ofthis work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the tirst page.TO ccjl,y othcrtbise, to republish, to post on servers or to redistribute to lists.