On Tuesday, 20 March 2018 at 09:44:41 UTC, Dennis wrote:
Simply running a "hello world.exe" takes, on my pc:

1.12s When compiled with dmd
0.62s When compiled with ldc
0.05s When compiled with dmc (C program) or dmd/ldc as a -betterC program

I suppose initializing the runtime takes a lot of time. When making a simple command line utility, half a second of delay is highly undesirable.

Are there ways to reduce this to below 0.1s, or should I just leave idiomatic D and make a betterC program?

It's not necessarily the runtime that's slow.

Besides if it was and it took 1 second to startup, then it wouldn't matter in practice with an actual application.

Besides there could be a lot other factors.

Without actual compiler versions, compiler flags and example code then it's pretty much impossible to tell what's slow.

For me it's certainly not that slow with dmd.

Reply via email to