Re: Use C99 designated initializers for some structs

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>
Cc: David Steele <david(at)pgmasters(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use C99 designated initializers for some structs
Date: 2018-08-30 00:35:57
Message-ID: 5B873BED.9080501@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/29/18 18:51, Tom Lane wrote:

> As against that, of course, explicitly zeroing fields that you know very
> well are already zero eats some cycles. I've occasionally wondered if

I haven't checked what a smart C99 compiler actually emits for a
designated initializer giving a field a compile-time known constant zero.
Is it sure to eat any more cycles than the same initializer with the field
unmentioned?

-Chap

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2018-08-30 01:09:53 RE: speeding up planning with partitions
Previous Message Michael Paquier 2018-08-30 00:13:52 Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdown when pmState == PM_STARTUP