I've been using a new feature in Microsoft Visual Studio 2005
called Profile Guided Optimization. It's been in GCC and ICC
for a while but one of the effects that I've noticed on Win32
is that the size of the executable is 60% larger with PGO.
PGO adds about a 7% performance improvement on my application
so I think that it's well worthwhile and I think that a lot of
the improvement is due to inlining code that was otherwise in
discrete functions. This can cut down on stack movement and
memory latency in fetching code in a subroutine that isn't near
the calling code.
My performance model basically is pretty blase' when it comes
to memory use as memory is cheap and plentiful and it's there
to be used.
There's also the Windows Cache and generally, the more memory you have, if your system is up for long periods of time, the better the overall system performance.