Boost logo

Boost :

Subject: Re: [boost] [context review] Quick Review
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-01-03 16:48:14

Am 03.01.2012 20:57, schrieb Stewart, Robert:
> I'd like to see a performance comparison of using Boost.Context versus Chris Kohlhoff's coroutines. Can his coroutines be replaced with yours without loss of efficiency? Would it require a different stack allocator to match the performance of his coroutines? (Developing the example in that direction would be useful to illustrate writing a custom stack allocator.)

Chris provides some kind of preprocessor-based coroutines together with
the witch statement == stack-less coroutines. Therefore Chris coroutines
doesn't require a stack allocator.
In contrast boost.context allows to leave and re-enter nested functions
(stack) because boost.context is a kind of to stack-full coroutine.
The benefit is, in the case of ASIO, you could parse the half-received
message of an application-protocol-stack and yield inside the parser
until the next portion arrived (parsing the message and yield go ahead
until complete message is received).

> I don't find anything related to the Movable Stack concept suggested in the acceptance criteria. The documentation of the StackAllocator is lacking, but I've suggested a rewrite below. With that rewrite, I think it satisfies the Stack concept required for acceptance.

The stack is generated by the stack allocator - both are not required to
be moveable.
Stack-allocator is only required to provide following interface (section
'Stack allocation' in the docu):

void * allocate( std::size_t size);

void deallocate( void * vp, std::size_t size);

> There are no performance figures for Windows. Shouldn't there be?

I've no Windows on bare metal system so can't provide measurements

> I think I recall that the build system doesn't support the necessary information, by default, to permit building an ABI compatible version of the library. If that's not the case, then the "How to build and install" section needs more work. Either way, the Build acceptance criteria has not quite been met yet.

A Vladimir wrote to me last year - he is working on it but I don't know
the state of his work.


Boost list run by bdawes at, gregod at, cpdaniel at, john at