Java > Scala

bearophile bearophileHUGS at lycos.com
Wed Nov 30 16:54:41 PST 2011


Jude:

> Got any ideas for code that is currently way less than optimal in D?

Compared to Java running on the OracleVM D is most times slower when it comes to heavily garbage collected code, and often with floating-point-heavy code. Exceptions (and synchronized methods) are faster than D-DMD ones. Sometimes textual I/O is faster in Java compared to D-DMD-Phobos one. Often the JavaVM is able to de-virtualize and inline virtual calls, while D-DMD is not able to do this (maybe LDC2-LLVM3 will be able to do this a bit), making such code faster. The JavaVM is usually able to dynamically unrool loops that have a loop count known only at runtime, this sometimes speeds up loops a lot compared to D-DMD. Some of Java libraries implement important data structures or other things that are currently sometimes significantly faster than equivalent D ones. This is probably a not complete list.

Bye,
bearophile


More information about the Digitalmars-d mailing list