Nikhil Sontakke wrote:
> I was wondering why -Os is not used in place of -O2 while compiling the
> Postgres sources with gcc. I prepared 2 install directories by respectively
> using -Os and -O2 flags and in the former case it seems to reduce the
> install footprint by about 1MB or so. Agreed this is not significant for
> normal systems. But I was wondering if there is a performance reason too for
> not using -Os.
-Os disables optimizations that make the code run faster, like loop
unrolling. There's no free lunch.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com