Empy program running time
Steven Schveighoffer
schveiguy at yahoo.com
Fri Jul 29 07:09:20 PDT 2011
On Fri, 29 Jul 2011 09:37:36 -0400, bearophile <bearophileHUGS at lycos.com>
wrote:
> On an oldish Windows PC an empty C program generated by GCC takes about
> 0.03 seconds to run. An empty D2 program runs in about 0.11 seconds. Is
> this expected/good/acceptable/fixable?
It is expected. A d program must initialize both the C runtime and the D
runtime, whereas a C program only needs to initialize C.
For example, D needs to call all the module ctors and do the import cycle
detection algorithm.
0.11 seconds is not unreasonable. But I'll also stress that timings at
this precision can be fairly volatile.
-Steve
More information about the Digitalmars-d-learn
mailing list