Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [afio] Formal review of Boost.AFIO
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-08-24 09:15:25


On 24 Aug 2015 at 7:37, Andreas Schäfer wrote:

> > Correct. I summarise everything you need to know about monad<T> on
> > the first page of the tutorial
> > https://boostgsoc13.github.io/boost.afio/doc/html/afio/quickstart/work
> > shop/naive.html.
>
> Which links to [1], a link that yields a 404. Via [2] and [3] I found
> [4]. Is that the current documentation of Monad?

That's all the formal documentation I've written to date yes.

> In "Complexity
> guarantees" some of the minimum complexities exceed their maximum
> counterparts (e.g. "51 opcodes <= Value transport <= 32 opcodes").
> What's that supposed to mean? What is the rationale behind citing
> minimum complexities? And why do you measure opcodes instead of, say,
> time?

Monad is designed to be as absolutely as lightweight as possible, and
is per-commit CI tested to ensure it generates no more than X opcodes
per operation.

Traditional complexities such as O(N) make no sense for Monad. No
operation it does isn't constant time. You're really testing how
friendly Monad is to the compiler optimiser (which is very friendly).

> Since you mentioned monads were basically identical: why don't you
> just use std::future?

AFIO has never been able to return a plain std::future because of the
lack of standardised wait composure in current C++ i.e.
when_all(futures ...). It returns an afio::future<> which internally
keeps a unique integer which looks up stored continuations in an
unordered_map. This let AFIO implement continuations on top of
std::future.

Monad contains a full Concurrency TS implementation, and works
everywhere in any configuration and currently with far lower
overheads than any existing STL implementation by a big margin (about
50%). That means AFIO can drop the internal unordered_map, and become
a pure Concurrency TS implementation with no workarounds and more
importantly, no central locking at all. That will eliminate the last
remaining synchronisation in AFIO, and it will be a pure wait free
solution.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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