Message passing between threads: Java 4 times faster than D

deadalnix deadalnix at
Fri Feb 10 06:07:41 PST 2012

Le 09/02/2012 20:57, Martin Nowak a écrit :
> On Thu, 09 Feb 2012 16:44:46 +0100, Sean Kelly <sean at>
> wrote:
>> So a queue per message type? How would ordering be preserved? Also,
>> how would this work for interprocess messaging? An array-based queue
>> is an option however (though it would mean memmoves on receive), as
>> are free-lists for nodes, etc. I guess the easiest thing there would
>> be a lock-free shared slist for the node free-list, though I couldn't
>> weigh the chance of cache misses from using old memory blocks vs. just
>> expecting the allocator to be fast.
> I didn't yet got around to polish my lock-free SList/DList implementations,
> but mutexes should only become a problem with high contention when you
> need to block.
> You'd also would need some kind of blocking for lock-free lists.

Doesn't this require shared to be working ?

More information about the Digitalmars-d mailing list