This applet is “noth~l small example of the kind.of amazing performance you can squeeze out of Java if you are careful and diligent. David Lavallee uses many tricks to avoid excessive memory allocation and unnecessary calls to AWl’ drawing functions. Creating the lightbulb mask image from a small array of integers rather , than a loaded GIF image saves download time and increases flexibility. The use of paint(getGraphics(» rather than repaint() increases frame rate significantly. The performance gains from using copyArca() over rerendering the image or calling drawImage) are profound. Finally, the creation and use of IntHash makes for that last perform boost by not forcing the system to garbage-collect as often.