220 36410 <CAKqmYPYTBDjbzhuaNKZd54XqEx7W=x4HrmP390CqMODNP7E0Rg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Antony Polukhin <antoshkka@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Sub-objects and their copy ellision
Date: Thu, 28 Dec 2017 10:01:21 +0300
Lines: 85
Approved: news@gmane.org
Message-ID: <CAKqmYPYTBDjbzhuaNKZd54XqEx7W=x4HrmP390CqMODNP7E0Rg@mail.gmail.com>
References: <caca241d-3498-b79b-fbf3-e57d8b7c3518@technion.ac.il>
 <1c6eff77-d71f-4dd7-8c13-f609460a03f0@isocpp.org> <c14fe13b-a658-e295-40a6-1465638d18db@technion.ac.il>
 <3ec0bd22-b228-4026-bb49-aec5102918c7@isocpp.org> <CAKqmYPbdMjxUOp9u+Ercx+eYjvUJvAn+CZe5EDpgGd4vaz47ag@mail.gmail.com>
 <924751e5-c880-42aa-95ab-99ef1050be2e@isocpp.org> <80bbb75a-2a62-537a-3733-898225325a41@technion.ac.il>
 <83d8a425-fd2f-41b6-9941-2a5deb27806d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c1c00f4670c1e056161151b"
X-Trace: blaine.gmane.org 1514444373 30319 195.159.176.226 (28 Dec 2017 06:59:33 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 28 Dec 2017 06:59:33 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDR7DZXHY4MRBQ5NSLJAKGQEQSXIJEY@isocpp.org Thu Dec 28 07:59:29 2017
Return-path: <std-proposals+bncBDR7DZXHY4MRBQ5NSLJAKGQEQSXIJEY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDR7DZXHY4MRBQ5NSLJAKGQEQSXIJEY@isocpp.org>)
	id 1eUS9x-0007E8-J5
	for gclcip-std-proposals@m.gmane.org; Thu, 28 Dec 2017 07:59:21 +0100
Original-Received: by mail-lf0-f71.google.com with SMTP id t13sf9672970lfe.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 27 Dec 2017 23:01:24 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1514444484; cv=pass;
        d=google.com; s=arc-20160816;
        b=UADYo4J9ZM5hG2oR+aUo6rJ5itvbHN9kTPOaTrOH4GR9OvcSXiQhe+S7KjdZFqNzY9
         L1sH756rdRf/GAsScaVV/P/nEka/m1/AiNfpcX5/K90F9l9cyGIQfu5zyz9l7JsTdISF
         WrBAHJulP/KVpOxmYkYyN5IDQywx1aBpj7T/aqpUf+2t5Tfrpp6weB2bBJ+H7r3VNrCT
         iCKrGt/DH16ZhFKaJOZuUK00qzHJU6tmiREfZNYE0QXyUfBwsUMv6doudBsa6YYj3bym
         cY1ITwXTB6IVE/FY1Gc0CXfDXHgMrlWeUoY1PnvzlZZ19DHYxF24vndJT8Uhn5cm0aLz
         u4sg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=5j2ZrjsmmViXoSPdz6lXL2zAgYGA/1FFCKAEU6/5U+A=;
        b=K2TDDAtY9zNuzCtnztXvEwMlsCz3o5K0rUpO6/fz4BCIRfojfKIso0lirLWOnz/r7T
         nIc+5Q1GajroUjOlHFkuWSIPAU4XNN+u1/lhgFSICTjZnynaUcAp8orrTrDsQREJEsUm
         yA7uNtQyENNM+i9K1zFFKCwHf3+SAmts6vK+/FuXLrHje6DhuqpHnTuBm2SVUhyRrk/Q
         bZ9ShY/IM8nz6mR1cv/xhDTaKDRFYGPZ945aYpJm1GohZKLqV3IOJ5H0AifAAgpqUDYE
         hXWrsF5eiSrymvd5F8DVDfrmo8tiGiE8S6wrIRx0oI9uNcrvUrt6SeBzPY3WKK3eaf4q
         UFRg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=XnUAUCA1;
       spf=pass (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=antoshkka@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=5j2ZrjsmmViXoSPdz6lXL2zAgYGA/1FFCKAEU6/5U+A=;
        b=01WuljFztv5vjCKuGJNt1zwXLmY+ylQ6Vb8nLt1MNMkcMBAqdgmxwRPudyda6os4Sq
         Dw/00VpVr/rsMo68Nq9bsqgymYR0WXBK+cUrnMPP8Ie0VegmhpL90TD+XRwPJoFS8mYC
         CsAIz9fZuFrDdTNl6L35k0mBeWbJVJWgdZoETyjtbfgd0FN/X31nv1P1e8xy8EsZQbzH
         3QdHlF+uRRAU0QAVAgBS58OxcZbIs3T7Dk2KUtHIrq2GrcjV+TJ7w6Ili5rnA5Vd2jf+
         M1irETUsKY9PKNRKsTRU/fPmqMsBUaHVlB+S4qchkpdt7S2zPFk/isSQWkX5CN5+YcGH
         44Cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=5j2ZrjsmmViXoSPdz6lXL2zAgYGA/1FFCKAEU6/5U+A=;
        b=g++JHrLlWZOxRzMYG1NgHv50aejUkV3Qcfrq5Mn+mo+m7acp5Sy4J+3W5KSt/3DSKo
         fcma7N/Dk5IdqICSzMFwi57TxkkhXD5H+SjezpIn7iK757xbDAkbsUNBHAJit1o7Ca0T
         0Lh0sP87DHIsLEXNcclGRr8eiIJ8nR7eQAN1vIaYY/IJzx/LavY6l+kfvMP8QNeljlCT
         BGHkPLx9lhLzZrPENw5sb7rfTA9Eihl0zFYWMK155kMhTdAzRkpc5egB6IVTLMPj+MbL
         8H4cHyWIiuRFYdpPlfmywCX3WVC8PU28jYdM76zBpTe6/YqPE5mm/ItPGhJ/PxLyu/0V
         cOug==
X-Gm-Message-State: AKGB3mIYw1+Z7PdiSj0rRuOna0ATiDSP/2kshylMxs0OOirmEVYvcEoX
	KzsZKcL5j9rbj5Aj3kJhfqZ3qA==
X-Google-Smtp-Source: ACJfBovxCbZHYq4pKYkPoZrMF8kkzan3FQjcMrKTmweP2TB0YAryF0K1o5yOgfx3l0fACfBYMgYALw==
X-Received: by 10.25.153.16 with SMTP id b16mr52368lfe.15.1514444484686;
        Wed, 27 Dec 2017 23:01:24 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.46.61.11 with SMTP id k11ls1969023lja.6.gmail; Wed, 27 Dec
 2017 23:01:22 -0800 (PST)
X-Received: by 10.46.116.9 with SMTP id p9mr17590755ljc.28.1514444482782;
        Wed, 27 Dec 2017 23:01:22 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1514444482; cv=none;
        d=google.com; s=arc-20160816;
        b=d/t/KB2elT5OIBSn62jG7ucEQHwfxOv0PNTs4kn96NX86qmI/xQKnOGMEVAHNfE27h
         PE2L+9oJbo4jRFer3f+vgl1+9SG3+3foVVoVTNdCCM/SELZal+Ybiishz0lC8jEau/tV
         vrrBN0+OQCwYUHLgNkZykB1zbMUqtNELdduGW9CTW7lqadOgdA6glX4tqOKWp6HjpXZk
         NeYvPeAKjX6CUE8MRy4NHJUNmm1XMqVXpB/CUHMhprxnfM0spgm8AIz0tzeGQFEJNdSR
         TVYe8WF7G3mIPMcaBFeVsdtzaptP7Rx2Pqzp5Z2GbLg8oFxmZMsnwTeu8pxjuzPBYuZe
         ssnA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=qVrWEcpevDKy+OPx94h1V9kLKWQ5EYOVRcZEempZ8wM=;
        b=DatPBAZcOYZqK7nfeweuViVRfAQMGtUF/YkJRsNxUNLIKvGfyOQmYspVj7isagq0tJ
         W3XxbDamAUS35jFFEJoUyLJtqH8ERBe/cntUjBXRcc2sF6tKBSr6vxlBrONBBIdowy0p
         kndj89at8ONj0lPMByIcG7IkhPijuNN3uf3MDd+NcUBua5AuAhNtpWorejabmh2K7fPS
         LQWYART6z3B6cYsRehXrRSMv0rcxJZi0KsqhOSv1pA5F5IQvviOp+GGihBBJZgD8u020
         LFt844byAOuYjE4uJ8UbH4o6q8dbECxmspPDmmG8mm6K0KECFMcx5TAtrSOf9AhvC6Tm
         l9jg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=XnUAUCA1;
       spf=pass (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=antoshkka@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id h23sor5739816lji.79.2017.12.27.23.01.22
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 27 Dec 2017 23:01:22 -0800 (PST)
Received-SPF: pass (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.46.25.85 with SMTP id p82mr18856600lje.29.1514444482348;
 Wed, 27 Dec 2017 23:01:22 -0800 (PST)
Original-Received: by 10.25.215.210 with HTTP; Wed, 27 Dec 2017 23:01:21 -0800 (PST)
In-Reply-To: <83d8a425-fd2f-41b6-9941-2a5deb27806d@isocpp.org>
X-Original-Sender: antoshkka@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=XnUAUCA1;       spf=pass
 (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=antoshkka@gmail.com;       dmarc=pass (p=NONE
 sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:36410
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36410>

--94eb2c1c00f4670c1e056161151b
Content-Type: text/plain; charset="UTF-8"

2017-12-26 18:25 GMT+03:00 Nicol Bolas <jmckesson@gmail.com>:

> On Tuesday, December 26, 2017 at 4:05:52 AM UTC-5, Eyal Rozenberg wrote:
>>
>> On 12/25/17 8:15 PM, Nicol Bolas wrote:
>> > On Monday, December 25, 2017 at 1:12:19 PM UTC-5, Antony Polukhin
>> wrote:
>> > Why is this circumstance important enough to be /worth/ all of this
>> hassle?
>>
>> Because right now compilers are entirely-or-partially prevented from
>> applying a useful optimization in some relatively-common cases.
>>
>
> I see little evidence that these cases are indeed "relatively-common"
> enough to bother with this.
>

I've added an example where moving out std::string produces much worse
assembly than with move elision of subobjects. Is that example convincing?
It's in the "The problem is not that big" concern
http://apolukhin.github.io/papers/ultimate_copy_elision.html

-- 
Best regards,
Antony Polukhin

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKqmYPYTBDjbzhuaNKZd54XqEx7W%3Dx4HrmP390CqMODNP7E0Rg%40mail.gmail.com.

--94eb2c1c00f4670c1e056161151b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">2017-12-26 18:25 GMT+03:00 Nicol Bolas <span dir=3D"ltr">&lt;<a href=3D=
"mailto:jmckesson@gmail.com" target=3D"_blank">jmckesson@gmail.com</a>&gt;<=
/span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"lt=
r"><span class=3D"gmail-">On Tuesday, December 26, 2017 at 4:05:52 AM UTC-5=
, Eyal Rozenberg wrote:</span><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex"><span class=3D"gmail-">On 12/25/17 8:15 PM, Nicol Bolas wrote:
<br>&gt; On Monday, December 25, 2017 at 1:12:19 PM UTC-5, Antony Polukhin =
wrote:
<br></span><span class=3D"gmail-">&gt; Why is this circumstance important e=
nough to be /worth/ all of this hassle?
<br>
<br>Because right now compilers are entirely-or-partially prevented from
<br>applying a useful optimization in some relatively-common cases.<br></sp=
an></blockquote><div><br></div><div>I see little evidence that these cases =
are indeed &quot;relatively-common&quot; enough to bother with this.</div><=
/div></blockquote><div><br></div><div>I&#39;ve added an example where movin=
g out std::string produces much worse assembly than with move elision of su=
bobjects. Is that example convincing? It&#39;s in the &quot;The problem is =
not that big&quot; concern <a href=3D"http://apolukhin.github.io/papers/ult=
imate_copy_elision.html">http://apolukhin.github.io/papers/ultimate_copy_el=
ision.html</a><br></div><div><br></div></div>-- <br><div class=3D"gmail_sig=
nature">Best regards,<br>Antony Polukhin</div>
</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKqmYPYTBDjbzhuaNKZd54XqEx7W%3Dx4Hrm=
P390CqMODNP7E0Rg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKqmYPYTBDjbzh=
uaNKZd54XqEx7W%3Dx4HrmP390CqMODNP7E0Rg%40mail.gmail.com</a>.<br />

--94eb2c1c00f4670c1e056161151b--

.
