[M3devel] userthreads vs. pthreads performance?

Tony Hosking hosking at cs.purdue.edu
Tue Mar 30 14:51:34 CEST 2010



On 30 Mar 2010, at 02:37, Jay K wrote:

> > The only requirement for M3 was that we have proper support for
> > atomic ops in the language upon which to build the synchronisation
> > primitives. We are close to having this now.
>  
>  
> Or surely implement them in C..

We want them inline.

> Anyway, I believe m3back now (a few weeks) has parity with or exceeds the gcc backend.
>  Depending on interpretation.
>  
>  
>  The gcc backend only accepts some memory orders.
>  
>  
>  m3back accepts them all and interprets them all as sequential.

same as gcc.

>  
>  
> I have more testing and optimization to do, but I think it is all there
> and probably works. Optimization in particular is that add/sub/xor
> don't need to use compare/exchange/retry loops.
>  
>  
> And load/store could certainly be more efficient such as just
> using one exchange to do a store, instead of a fence on either side.
>  
>  
> I think it is also probably reasonable to defined variants that
> don't return the new value. That way or and and can be provided
> more efficiently -- without a compare/exchange/retry loop.
>  
>  
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100330/64801552/attachment-0002.html>


More information about the M3devel mailing list