Message passing between threads: Java 4 times faster than D
mw
mingwu at gmail.com
Fri Jun 12 06:20:10 UTC 2020
On Thursday, 9 February 2012 at 09:09:24 UTC, Nicolae Mihalache
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.
I just tried the attached program, D is still 3~4 times slower
than the Java version.
Have we made any improvement on the message passing between
threads since 2012?
Or is there any new way to improve the D verson?
Thanks.
More information about the Digitalmars-d
mailing list