public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: gcc@gcc.gnu.org,Nathan Sidwell <nathan@acm.org>,Iain Sandoe
	<idsandoe@googlemail.com>,Sebastian Huber
	<sebastian.huber@embedded-brains.de>
Cc: GCC <gcc@gcc.gnu.org>
Subject: Re: For which gcc release is going to be foreseen the support for the Coroutines TS extension?
Date: Tue, 20 Aug 2019 15:54:00 -0000	[thread overview]
Message-ID: <35DC8BFA-112B-4E2C-BF4F-CEBDF62DDCC5@gmail.com> (raw)
In-Reply-To: <a3f826ac-ca56-d63f-39ae-346b1752ebf1@acm.org>

On August 20, 2019 5:19:33 PM GMT+02:00, Nathan Sidwell <nathan@acm.org> wrote:
>On 7/26/19 6:03 AM, Iain Sandoe wrote:
>> Hello Sebastian,
>> 
>>> On 26 Jul 2019, at 10:19, Florian Weimer <fweimer@redhat.com> wrote:
>
>>> C++ coroutines are stackless.  I don't think any new low-level
>run-time
>>> support will be needed.
>> 
>> correct, C++20 coroutines and threading mechanisms are orthogonal
>> facilities; one can use (IS C++20) coroutines on top of a threaded
>system
>> or in a single-threaded environment.
>> 
>> Two places I see them as being a go-to facility in embedded systems
>are:
>>   * co-operative multi-tasking UIs on single-threaded platforms.
>>   * async I/O completion by continuations, rather than callbacks.
>
>There are cases where the overhead of threads is too expensive.  For 
>instance hiding (cache-missing) load latencies by doing other work
>while 
>waiting -- a context switch at that point is far too expensive.

But are coroutines so much lower latency (and a context switch does not involve cache misses on its own?). For doing useful work in this context CPU designers invented SMT... 

Richard. 

>nathan

  reply	other threads:[~2019-08-20 15:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 17:32 Marco Ippolito
2018-06-04 17:36 ` Jonathan Wakely
2018-06-06  7:14   ` Florian Weimer
2019-07-26  8:54     ` Sebastian Huber
2019-07-26  9:19       ` Florian Weimer
2019-07-26 10:03         ` Iain Sandoe
2019-08-20 15:19           ` Nathan Sidwell
2019-08-20 15:54             ` Richard Biener [this message]
2019-08-20 16:15               ` Florian Weimer
2019-08-21 12:29                 ` Iain Sandoe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35DC8BFA-112B-4E2C-BF4F-CEBDF62DDCC5@gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=idsandoe@googlemail.com \
    --cc=nathan@acm.org \
    --cc=sebastian.huber@embedded-brains.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).