Thread overview
Re: Message passing between threads: Java 4 times faster than D
Feb 09, 2012
Oliver Plow
Feb 10, 2012
Andrew Wiley
Feb 10, 2012
Oliver Plow
February 09, 2012
Hi Nicolae,

I don't know whether you are particularly interested in the case you presented. For performance comparison between D and other languages in general there is this article that I think is quite good: http://janus.cs.utwente.nl:8000/twiki/pub/Composer/DotNetGeneral/csharp-performance.pdf

It is allready quite old and stems from 2003. Would be interesting to see how the repport would like like today when the benchmarks were redone. As your example suggested these number crunching-oriented benchmarks as in this report are not always that meaningful for everday life performance issues.

Regards, Oliver

-------- Original-Nachricht --------
> Datum: Thu, 9 Feb 2012 10:06:40 +0100
> Von: Nicolae Mihalache <xpromache@gmail.com>
> An: digitalmars-d@puremagic.com
> Betreff: Message passing between threads: Java 4 times faster than D

> Hello,
> 
> I'm a complete newbie in D and trying to compare with Java. I implemented  a simple test for measuring the throughput in message passing between threads. I see that Java can pass about 4mil messages/sec while D only achieves 1mil/sec. I thought that D should be faster.
> 
> The messages are simply integers (which are converted to Integer in Java).
> 
> The two programs are attached. I tried compiling the D version with both dmd and gdc and various optimization flags.
> 
> mache

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
February 10, 2012
On Thu, Feb 9, 2012 at 3:06 AM, Nicolae Mihalache <xpromache@gmail.com> wrote:
> Hello,
>
> I'm a complete newbie in D and trying to compare with Java. I implemented  a simple test for measuring the throughput in message passing between threads. I see that Java can pass about 4mil messages/sec while D only achieves 1mil/sec. I thought that D should be faster.
>
> The messages are simply integers (which are converted to Integer in Java).
>
> The two programs are attached. I tried compiling the D version with both dmd and gdc and various optimization flags.
>
> mache

I recently completed a message passing library in D that lets the messages be passed between actors that don't necessarily correspond to threads (as std.concurrency requires). I'll see how it does on your benchmark.
February 10, 2012
> I recently completed a message passing library in D that lets the messages be passed between actors that don't necessarily correspond to threads (as std.concurrency requires). I'll see how it does on your benchmark.

Sounds quite interesting. You created some kind of thread pool for your library? Is this work "company internal" or will it be published? Would be cool to have something like that for D.

Cheers, Oliver

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de