I don't doubt the performance claims (I'm off to try it for myself in a bit) but... this seems totally counterintuitive. How can compressing an executable improve performance? Wouldn't any gains made by loading smaller files be lost during the decompression process?
Or is it true that this technique only applies to certain classes of executable? For instance, FireFox is a win, but running upx on (say) Microsoft Office makes things worse?
UPDATE: I tried it, and sure enough, FireFox seems zippier. Purely subjective, but it really does seem to load faster.
I did some quick googling on UPX and learned that the effect works well for applications that are run once (e.g. FireFox) but does not work very well for applications that load multiple times and "share" memory footprints (Office, for example). For those apps, the compressed nature of the .exe prevents Windows from sharing the memory, resulting in multiple copies of the same .exe eating up identical chunks of RAM. May be a trivial matter on a 2GB workstation, or maybe not -- its your call to make.
Also, I learned that UPX uses an in-place decompression routine which means it (usually) does not generate temporary files. This is good, in that reading the whole compressed .exe and writing out a decompressed version before running it would actually degrade performance, not enhance it.
Some performance gains may be due to the virus scanner you use. Many cannot read a UPX-compressed executable beyond the loader, which short-circuits scanning of the whole file (which is seen as data). Thus, instead of scanning (say) 10 megabytes of .exe for malware, only the first few K are scanned -- a significant savings.
The flip side to this is a bit worrisome: if your virus scanner cannot penetrate the .exe, it can't protect you. Many viruses & trojans come compressed with UPX (or similar techniques) for this reason alone.
I checked and the scanner I use -- NOD32 -- does scan UPX compressed executables.
As in most things, the bottom line is: YMMV. The FireFox hack seems to be a win, and so I'll keep it. But thanks to nosh I learned about a new utility today which I will use to experiment with on my own projects. Thanks!