On Thursday, 30 June 2016 at 01:32:47 UTC, Martin Nowak wrote:
On Thursday, 30 June 2016 at 01:20:08 UTC, Stefan Koch wrote:
First small code example compiles!

int bug6498(int x) {
 int n = 0;

 while (n < x) {
  n++;
 }

 return n;
}

evaluation of bug6498(100_000_00) took 226 msecs.
evaluation of bug6498(100_000_000) took 2228 msecs.

The memory allocated by the Evaluator is exactly 12 bytes.

The speedup comes from interpreting the IR or fixing the memory leaking?

Both. Actually I could not imagine fixing the memory problem without doing IR interpretation.
I will tackle compiling more difficult code later today.
As soon as I can run my compiletime brainfuck I will open a PR.

Until then you can see my progress at https://github.com/UplinkCoder/dmd/tree/newCTFE
I will try to always keep the branch in a healthy state.

Reply via email to