From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Windows warnings from VS 2017
Date: Fri, 22 Sep 2017 07:37:32 -0400
Message-ID: <c7e5532b-5db0-cab5-cbec-0c8c80b1035e@2ndQuadrant.com> (raw)
In-Reply-To: <20170922014108.64om7wh3ozfhcczl@alap3.anarazel.de>
References: <f6488a36-4702-6d50-9fb4-fee10bb49497@2ndQuadrant.com>
<8649.1505951694@sss.pgh.pa.us>
<acf6b500-0f91-cb38-d76b-17b6de29a606@2ndQuadrant.com>
<c8fc2cd2-584f-1bf7-8d4a-ae05db709ad2@2ndQuadrant.com>
<CAJrrPGfJMmM3iSrxAqiSJfV8L=3KBQobK9Nhbsns2jGD+fQ==w@mail.gmail.com>
<bfa18917-9cfa-57ce-1806-043d478c9519@2ndQuadrant.com>
<7214.1506000631@sss.pgh.pa.us>
<20170922014108.64om7wh3ozfhcczl@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 09/21/2017 09:41 PM, Andres Freund wrote:
> On 2017-09-21 09:30:31 -0400, Tom Lane wrote:
>> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
>>> The speed of memset is hardly going to be the dominating factor in a
>>> 'CREATE DATABASE' command, so we could certainly afford to change to
>>> plain memset calls here.
>> Another thought is that it may be time for our decennial debate about
>> whether MemSet is worth the electrons it's printed on. I continue to
>> think that any modern compiler+libc ought to do an equivalent or better
>> optimization given just a plain memset(). If that seems to be true
>> for recent MSVC, we could consider putting an #if into c.h to define
>> MemSet as just memset for MSVC. Maybe later that could be extended
>> to other compilers.
> +many. glibc's memset is nearly an order of magnitude faster than MemSet
> on my machine for medium+ length copies, and still 3-4 four times ~100
> bytes. And both gcc and clang optimize way the memcpy entirely when the
> length is a fixed short length.
Perhaps we need some sort of small benchmark program that we can run on
a representative set of platforms? I presume if you can make that
assertion you already have something along those lines?
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: andrew.dunstan@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, kommi.haribabu@gmail.com
Subject: Re: Windows warnings from VS 2017
In-Reply-To: <c7e5532b-5db0-cab5-cbec-0c8c80b1035e@2ndQuadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox