Re: equal() perf tweak
От | Tom Lane |
---|---|
Тема | Re: equal() perf tweak |
Дата | |
Msg-id | 16364.1068096518@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: equal() perf tweak (Neil Conway <neilc@samurai.com>) |
Список | pgsql-patches |
Neil Conway <neilc@samurai.com> writes: > Interesting. I've heard in some shops it is standard policy to order > the fields in all structs by their descending sizes (making allowances > for platform-specific variations), so as to reduce padding. Do you > think it would be worthwhile to systematically make this kind of > reorganization throughout the backend? Not really. I'll go with ordering fields in a logical fashion (related fields together) every time. But when there's no particular semantic reason to choose one ordering over another, you might as well look at padding concerns for a tiebreaker. In this case there isn't any particular logical reason AFAICS to prefer whether length appears before or after head/tail, so why not pick the more compact form? (Note that I put a higher premium on avoiding padding in on-disk structures. But for transient in-memory structures, it definitely seems like a secondary consideration.) regards, tom lane
В списке pgsql-patches по дате отправления: