Boost logo

Boost :

Subject: Re: [boost] [Review.Coroutine] Vicente's review
From: Eugene Yakubovich (eyakubovich_at_[hidden])
Date: 2012-09-13 12:44:22


>>> Is the rationale for using self_t to get better performances?
>>> Maybe both interfaces could be provided.
>>
>> At least it would introduce additional indirections.
>>
>
> I agree that a thread specific pointer is not gratuitous, but adding the
> self_t parameter over the whole stack has its cost also.
>
> Providing both approaches would let the user choose which one is best
> adapted to her context.

I like not having the self parameter but using TLS can be slow. The
use of Boost's thread_specific_ptr (which uses pthread api) is
especially slow. Using gcc's __thread attribute is much faster (I
think that's acceptable performance wise) but this route will make it
harder to support all the compilers.

Regards,
Eugene


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