Re: gcc: why optimize for size flag is not the default

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: gcc: why optimize for size flag is not the default
Дата
Msg-id 49B77643.9060400@enterprisedb.com
обсуждение исходный текст
Ответ на gcc: why optimize for size flag is not the default  (Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>)
Ответы Re: gcc: why optimize for size flag is not the default
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nikhil Sontakke
Дата:
Сообщение: gcc: why optimize for size flag is not the default
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Prepping to break every past release...