Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvMHG-0001YR-Qj for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Sep 2017 11:37:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dvMHG-0005lc-1P for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Sep 2017 11:37:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dvMHE-0005lB-VA for pgsql-hackers@postgresql.org; Fri, 22 Sep 2017 11:37:49 +0000 Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dvMH2-0001r2-FP for pgsql-hackers@postgresql.org; Fri, 22 Sep 2017 11:37:48 +0000 Received: by mail-yw0-x232.google.com with SMTP id o143so529537ywd.12 for ; Fri, 22 Sep 2017 04:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=ADj6ajPHpC+W5LY6YBbinO9nlAKScI3qooZaL8/sRxc=; b=QXZwMkt+OdFi+nnDzgkMMjVwjRGP/korHlhHdu6fLqzhNHJ3KH8X2azKw3hQRwNZHs OGZyyZcA3Szz//uM8go/oQF7c8qxLy0t+RSh5V4yO1P4Nv8Stqw4aSMjF4Eunleji5vj uipOcOPwj5GJMpD5k/6RNadSIBc1TGCaV/cbof3TY0HAkabwktYLcghqA7gVSg2dCPb4 LF56g3+EVIGUij0hqSSV4McpOqKNxIg4MOex9f2VSo8OK1HSQqHYwtuQmUz1TNpv2kzD LC2FwgaLFsxkLhw3h8maR8fRMpiXA0+RDKK2U7JmI1Wk9961KUh5wZ9qEDbfWqws3z8u rZww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ADj6ajPHpC+W5LY6YBbinO9nlAKScI3qooZaL8/sRxc=; b=ZqIEden+LH90z3Fow0+4TUmXxPnRDS7TS6kltuvYjZLWFHI8jXmrSNJ0sUlQeP2Rb4 Rr+hoJ2c1CQLxp2JGyGx1QWEiitCWMkfz+Fc1YKELJ185jBq8zDNbreJnba5UWT6NCMP iEa8BYQAzibpAlmy61CiYOmQp/K9wisxGlIGTMoyAS1klbZWOCjzoZ/KURHsJFxT9k98 60YKKd4kLQEYgP3f1nVp+/QbsyjtfaANv/CpFq9AvDS0PGbgOq5S5MlCsegbm/2aCzu3 sjh5v47tvXBGQbGzbe5Is+jpW3eEwa73kMo0v9Vz8AMzgOu3WQR3egTBVaaeXXKFR0u7 Au1g== X-Gm-Message-State: AHPjjUi2hriqlnmzuU5Xsm4QSqhcjAgBoF74h7UB1ibHPcO6i2QTW+HC /SKDJit0BnJKd14GdWTSOLHyWuSv4SKjPlRSTuxWSC5hVtcv0Y6J0CTAHC1Lt9ySH/o8wlS2TnY wp6H9oHPe3ZyCsSZ1LmTtM+AXI4YTynHgf9cm86I/JLLeSYUGBDQOr0La2QW4RypNsprG77j6n7 u6rzwFTnQ73UjJ X-Google-Smtp-Source: AOwi7QBPR9qxu6ZVmOopqhd22X5V0pm9kvYnTp+CXyP9EvTfG0kfkemjo3g7NpW9I6sjJgGx03XqBg== X-Received: by 10.13.241.134 with SMTP id a128mr2254248ywf.427.1506080254407; Fri, 22 Sep 2017 04:37:34 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id a14sm1436951ywh.47.2017.09.22.04.37.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 04:37:33 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: Windows warnings from VS 2017 To: Andres Freund , Tom Lane Cc: Haribabu Kommi , PostgreSQL-development References: <8649.1505951694@sss.pgh.pa.us> <7214.1506000631@sss.pgh.pa.us> <20170922014108.64om7wh3ozfhcczl@alap3.anarazel.de> Message-ID: Date: Fri, 22 Sep 2017 07:37:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170922014108.64om7wh3ozfhcczl@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/21/2017 09:41 PM, Andres Freund wrote: > On 2017-09-21 09:30:31 -0400, Tom Lane wrote: >> Andrew Dunstan 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