220 14199 <572122be-61c5-4b25-aef6-fee76dcd13da@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Gor Nishanov <gornishanov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: comment on n4244
Date: Fri, 24 Oct 2014 08:48:40 -0700 (PDT)
Lines: 89
Approved: news@gmane.org
Message-ID: <572122be-61c5-4b25-aef6-fee76dcd13da@isocpp.org>
References: <5d78c59b-4d67-45f6-9d99-8c4beeeac055@isocpp.org>
 <f783bffc-9810-48dd-b89c-1361ca285815@isocpp.org>
 <5344687e-e1de-4205-885c-b5c2f9580129@isocpp.org>
 <187da710-8adc-4516-bf64-263951503bc7@isocpp.org>
 <42ddf641-27c7-42a5-ab1c-772667797e5b@isocpp.org>
 <a901a369-5d04-4752-92af-b97a3a9496b2@isocpp.org>
 <05a08ac6-f9b8-4ebb-9cb8-9a37a6fd4527@isocpp.org>
 <CA+wfc1_scuY-imBS1wtRHmZO+zzg-yOct_u8wzxkvVhZfLtQTg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1381_183351237.1414165720752"
X-Trace: ger.gmane.org 1414165731 10091 80.91.229.3 (24 Oct 2014 15:48:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 24 Oct 2014 15:48:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC47RF4IW4GRBWXJVGRAKGQEH4K3FRA@isocpp.org Fri Oct 24 17:48:44 2014
Return-path: <std-proposals+bncBC47RF4IW4GRBWXJVGRAKGQEH4K3FRA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qc0-f200.google.com ([209.85.216.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC47RF4IW4GRBWXJVGRAKGQEH4K3FRA@isocpp.org>)
	id 1Xhh6a-0000M7-0W
	for gclcip-std-proposals@m.gmane.org; Fri, 24 Oct 2014 17:48:44 +0200
Original-Received: by mail-qc0-f200.google.com with SMTP id r5sf3152713qcx.3
        for <gclcip-std-proposals@m.gmane.org>; Fri, 24 Oct 2014 08:48:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=pwcwZzFlRxnMODpMQJVCdqytFfSJGxp2xHBm5i+L3AE=;
        b=JjmV0tBcQ+ze8KUn55lASf+9ynvnLYSqo7Q4eOGA9VPNXOVo0y/CHZd20gE7eIo7MV
         xHoTUbRfhiPS7WJBc4jlxgyIciFpQlcSmp9hBFvifU1u3WCjxazzwmsCsYX2RFSFNNkD
         6Q6jllynBvADFguhgV36PaHI6RUsQjKVTEObZlP0qwXle0DWeoLNbTJ6RXy1sEzZnNXO
         oUKOz/LIXDxTY4AuFnW+8ykdRUQWxIOS1k4JDzB8CpiCVd3icLpDZYqGmSScfr2d5wCz
         9EYDTIolUwLNTr829w2XGaWMcPYm/iH8c6aarifpkW6iG54KvqsB/OD2s/4db5ZxxZkB
         J6HQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=pwcwZzFlRxnMODpMQJVCdqytFfSJGxp2xHBm5i+L3AE=;
        b=H9Cp2urP+mUyrhtHK/Q7On6/IqZPiTraoqGNzXBzQAjEh2LVzJLGvmd7Z+RQ4k934N
         +3dDB84k9zBLQLSgmqnxosyXt/d0wZcbLr+osa8GZu5silZdUUXkX9jdigtqp4PeNwvJ
         Jw3/XpgW3Guf2OwOl8U7PpAFpLFRqrS/ypKmrsa8PXjdLBdQNIl/4qDMzvkMwuxaxPbO
         AAXNFwViuAETgPY56t07nzpcfhMglTjO9PVaBc/sMW69wxD4ASzJAlur8HeIxqtGjxDh
         HqOVYV6UiSIbp8MOMuhE9sLB5kc93fX9a51hlj7weK84QjR/uYrm3BGQ7w3+OqyDgZ+Y
         6gSg==
X-Gm-Message-State: ALoCoQksKtx3E1wdcEmoR88fuu+cBoz22L3ti/tW7qsrcnmikAQGU8msv5GtCeLMLAzM4MIxYmon
X-Received: by 10.224.122.15 with SMTP id j15mr8094182qar.6.1414165722841;
        Fri, 24 Oct 2014 08:48:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.2.7 with SMTP id 7ls211165igq.5.gmail; Fri, 24 Oct 2014
 08:48:42 -0700 (PDT)
X-Received: by 10.50.138.40 with SMTP id qn8mr58897igb.2.1414165722074;
        Fri, 24 Oct 2014 08:48:42 -0700 (PDT)
In-Reply-To: <CA+wfc1_scuY-imBS1wtRHmZO+zzg-yOct_u8wzxkvVhZfLtQTg@mail.gmail.com>
X-Original-Sender: GorNishanov@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14199
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14199>

------=_Part_1381_183351237.1414165720752
Content-Type: text/plain; charset=UTF-8


On Friday, October 24, 2014 7:51:38 AM UTC-7, Oliver Kowalke wrote:
>
> 2014-10-24 16:46 GMT+02:00 Giovanni Piero Deretta <gpde...@gmail.com 
> <javascript:>>:
>
>> hum, 41ns per iteration seems a bit high. A stackful coroutine yield 
>> should be around 10 clock cycles: save callee save registers, restore 
>> callee save registers (saving and restoring can be done in parallel), pop 
>> return address and jump (perfectly predictable in this case).
>>
>
> it depends on the architecture (compare x86_64 SYSV and x86_64 Win64).
> maybe Gor missed to enabled optimization and/or to spec. 
> BOOST_DISABLE_ASSERTS
>

This is x86_64 win64. I did not specify as you see in the snippet, I used 
default attributes (that save floats). 
Adding attributes(flag_fpu_t::fpu_not_preserved) drops it down from:

Stackful: 0.417057 secs: yields 10000000 values 41.705700ns per eac
to
recurse completes in 0.360136 secs: yields 10000001 values 36.013576ns per 
each
 
Though I consider that with modern compilers and CPU not saving floats is 
dangerous, unless you disable loop vectorization.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1381_183351237.1414165720752
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br>On Friday, October 24, 2014 7:51:38 AM UTC-7, Oli=
ver Kowalke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr"><div><div class=3D"gmail_quote">2014-10-24 16:46 GMT+02:00 Giovanni Pi=
ero Deretta <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank"=
 gdf-obfuscated-mailto=3D"D-gXZWxJ_9MJ" onmousedown=3D"this.href=3D'javascr=
ipt:';return true;" onclick=3D"this.href=3D'javascript:';return true;">gpde=
....@gmail.com</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D=
"ltr"><span></span><div>hum, 41ns per iteration seems a bit high. A stackfu=
l coroutine yield should be around 10 clock cycles: save callee save regist=
ers, restore callee save registers (saving and restoring can be done in par=
allel), pop return address and jump (perfectly predictable in this case).<b=
r></div></div></blockquote></div><br></div><div>it depends on the architect=
ure (compare x86_64 SYSV and x86_64 Win64).<br></div><div>maybe Gor missed =
to enabled optimization and/or to spec. BOOST_DISABLE_ASSERTS<br></div></di=
v></blockquote><div><br></div><div>This is x86_64 win64. I did not specify =
as you see in the snippet, I used default attributes (that save floats). Ad=
ding&nbsp;attributes(flag_fpu_t::fpu_not_preserved) drops it down from:</di=
v><div><br></div><div><span style=3D"color: rgb(136, 136, 136);">Stackful:&=
nbsp;0.417057 secs: yields 10000000 values 41.705700ns per eac</span><br></=
div><div><span style=3D"color: rgb(136, 136, 136);">to</span></div><div>rec=
urse completes in 0.360136 secs: yields 10000001 values 36.013576ns per eac=
h</div><div>&nbsp;</div></div><div>Though I consider that with modern compi=
lers and CPU not saving floats is dangerous, unless you disable loop vector=
ization.</div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1381_183351237.1414165720752--

.
