Re: Raising our compiler requirements for 9.6
От | Andres Freund |
---|---|
Тема | Re: Raising our compiler requirements for 9.6 |
Дата | |
Msg-id | 20150805134636.GF12598@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: Raising our compiler requirements for 9.6 (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Raising our compiler requirements for 9.6
Re: Raising our compiler requirements for 9.6 |
Список | pgsql-hackers |
On 2015-08-05 15:08:29 +0200, Andres Freund wrote: > We might later want to change some of the harder to maintain macros to > inline functions, but that seems better done separately. Here's a conversion for fastgetattr() and heap_getattr(). Not only is the resulting code significantly more readable, but the conversion also shrinks the code size: $ ls -l src/backend/postgres_stock src/backend/postgres -rwxr-xr-x 1 andres andres 37054832 Aug 5 15:18 src/backend/postgres_stock -rwxr-xr-x 1 andres andres 37209288 Aug 5 15:23 src/backend/postgres $ size src/backend/postgres_stock src/backend/postgres text data bss dec hex filename 7026843 49982 298584 7375409 708a31 src/backend/postgres_stock 7023851 49982 298584 7372417 707e81 src/backend/postgres stock is the binary compiled without the conversion. A lot of the size difference is debugging information (which now needs less duplicated information on each callsite), but you can see that the text section (the actual executable code) shrank by 3k. stripping the binary shows exactly that: -rwxr-xr-x 1 andres andres 7076760 Aug 5 15:44 src/backend/postgres_s -rwxr-xr-x 1 andres andres 7079512 Aug 5 15:45 src/backend/postgres_stock_s To be sure this doesn't cause problems I ran a readonly pgbench. There's a very slight, but reproducible, performance benefit. I don't think that's a reason for the change, I just wanted to make sure there's no regressions. Regards, Andres
Вложения
В списке pgsql-hackers по дате отправления: