Java Spring vs. D Vibe.d basic web performance
Vijay Nayar
madric at gmail.com
Fri Jun 17 21:37:52 UTC 2022
I created a small blog post about compilation speeds, binary
sizes, and request processing performance of Java Spring, D
Vibe.d compiled with debug/release mode and DMD/LDC compilers.
https://www.funnel-labs.io/2022/06/17/language-choice-and-performance-java-and-d/
The interesting thing is that a web service compiled with both
DMD and LDC in debug mode has very low throughput, much worse
than Java, however, D benefits from faster compilation times.
When compiling in release mode, both DMD and LDC have about 80%
to 100% higher performance than Java. The DMD and LDC versions
also run in significantly less RAM than Java as well (about a 95%
reduction in both resident and virtual memory).
A few other interesting observations are that a web-server
compiled with LDC takes up about 10x more virtual RAM compared to
the DMD version.
The final fascinating observation is this: despite the longer
initial compilation times when compiling in release mode, both
DMD and LDC have faster iterative compilations in release mode
than even debug mode. My suspicion is that the smaller file sizes
that result from compiling in release mode result in overall
faster incremental compilation. It makes me wonder if larger
companies could benefit strongly from even doing release mode
compilation, but keeping compiled artifacts in a shared server,
following a model similar to what [Bazel](https://bazel.build/)
can offer.
More information about the Digitalmars-d
mailing list