On clusters and DMPs, locality of objects and threads and hence avoidance o
f network communication, are crucial for the application performance. We sh
ow that-in certain situations-an extension of known type inference mechanis
ms can be used to compute placement decisions that improve locality of thre
ads and objects and hence reduce the application execution times, In additi
on to this general contribution, the paper specifically addresses the probl
ems that are caused by the distributed Java environment, Since the JVM and
the bytecode format are assumed to be fixed, the optimization is done as so
urce-to-source transformation. Copyright (C) 2000 John Wiley gr Sons, Ltd.