Boost logo

Boost :

Subject: Re: [boost] Library for await and stackless coroutine emulation
From: TONGARI J (tongari95_at_[hidden])
Date: 2015-03-09 21:12:24


2015-03-10 1:10 GMT+08:00 Bjorn Reese <breese_at_[hidden]>:

> On 03/05/2015 04:32 PM, TONGARI J wrote:
>
> You can find a more detailed description on the github page, if you want
>> to
>> know some number about performance, from a rough test borrowed from
>> Boost.Coroutine (symmetric/performance_switch.cpp), the avg cpu cycles
>> for
>> context-switch are:
>>
>> Boost.Coroutine: 40 cycles
>> CO2: 16 cycles
>> built-in await: 9 cycles
>>
>
> I am curious about the performance difference. How much context does
> CO2 preserve during a context-switch?
>

Only one `unsigned` for jumping(switch).

After some tuning, the context-switch is somehow faster than MSVC's __await.
CO2: 7 cycles; __await: 11 cycles.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk