Why Java (server VM) is faster than D?

aki via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 3 10:33:28 PDT 2015


On Monday, 3 August 2015 at 16:47:58 UTC, John Colvin wrote:
> changing two lines:
> final class SubFoo : Foo {
> int test(F)(F obj, int repeat) {

I tried it. DMD is no change, while GDC gets acceptable score.
D(DMD 2.067.1): 2.445
D(GDC 4.9.2/2.066): 0.928

Now I got a hint how to improve the code by hand.
Thanks, John.
But the original Java code that I'm porting is
about 10,000 lines of code.
And the performance is about 3 times different.
Yes! Java is 3 times faster than D in my app.
I hope the future DMD/GDC compiler will do the
similar optimization automatically, not by hand.

Aki.



More information about the Digitalmars-d mailing list