On Wednesday, 16 November 2016 at 10:07:06 UTC, Stefan Koch wrote:

A more accurate breakdown :

Initializing Heap:     18.6 ms
Generating Bytecode:    1.2 ms
Executing Bytecode:    13.2 ms
Converting to CTFE-EXp: 9.1 ms

For a second execution of the same function with the same arguments within the same file the numbers look like :

Initializing Heap:     16.7 ms
Generating Bytecode:    0.6 ms
Executing Bytecode:    13.2 ms
Converting to CTFE-EXp: 9.3 ms

The above numbers were obtained using a debug build made with dmd.
The following numbers are from a optimized build with ldmd2

First Execution (cold cache) :

Initializing Heap:     17.4 ms
Generating Bytecode:    0.7 ms
Executing Bytecode:     5.3 ms
Converting to CTFE-EXp: 5.1 ms

Second run (warmer cache) :

Initializing Heap:     16.9 ms
Generating Bytecode:    0.3 ms
Executing Bytecode:     5.3 ms
Converting to CTFE-EXp: 4.9 ms


Reply via email to