Why Java (server VM) is faster than D?

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 3 09:50:41 PDT 2015


On Monday, 3 August 2015 at 16:47:14 UTC, Adam D. Ruppe wrote:
> You can try a few potential optimizations in the D version 
> yourself and see if it makes a difference.
>
> Devirtualization has a very small impact. Test this by making 
> `test` take `SubFoo` and making `bar` final, or making `bar` a 
> stand-alone function.
>
> That's not it.

Making SubFoo a final class and test take SubFoo gives a >10x 
speedup for me.


More information about the Digitalmars-d mailing list