In hopes of squeezing a bit more performance out of firefox and thunderbird I decided to compile them from source with some gcc optimizations. Here's a general outline of what I had to do:
- Install needed build utilities: apt-get install autotools-dev fakeroot dh-make build-essential
- Make a directory for the source: mkdir src; cd src
- Download source: apt-get source PACKAGENAME
- Download build dependencies: apt-get build-dep PACKAGENAME
- Change into the directory create: cd NAME
- Edit 'debian/rules', change 'OPTFLAGS' to something better suited for your machine. I used: -O3 -march=prescott -pipe -ftracer -fomit-frame-pointer -freorder-blocks -fno-reorder-functions -funroll-loops -D_FORTIFY_SOURCE=2 -fweb -fno-strict-aliasing which should help speed things up for a Core Duo. If you have a different CPU some of these options may be different. D_FORTIFY_SOURCE will help against buffer overflows by being more strict on copies to buffers. See here.
- I also add export MOZ_MAKE_FLAGS='-j3' to the rules to help compile in parallel since I am using a dual core CPU.
- Build it: dpkg-buildpackage -rfakeroot -uc -b
- ... sit and wait, depending on the package this can take a long time
Something like that should work for most packages. Comment if you have any additional info or questions. Check out this
for more info on gcc optimization.