Preferring MemSet or memset?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Preferring MemSet or memset?
Date: 2014-11-05 02:17:17
Message-ID: CAB7nPqRT3EBt-GNYz54tSG2Bp=Thg-rztMbGuujU4YT-Acep7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

MemSet is an internal macro faster than the system memset for zeroing small
word-aligned structures defined in src/include/c.h. Both are being used
here and there with no real preference.
An example of that is that in many code paths we have for example nulls and
values used to build tuples, that are sometimes initialized with memset,
other times with MemSet. Wouldn't we gain a bit of performance by switching
to MemSet the initializations of nulls and values currently done with
memset?
Opinions?
Regards,
--
Michael

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-11-05 02:41:37 Re: Preferring MemSet or memset?
Previous Message Andres Freund 2014-11-05 01:13:47 Re: tracking commit timestamps