Battle-plan for CTFE

Martin Nowak via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jun 29 18:32:47 PDT 2016


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?


More information about the Digitalmars-d-announce mailing list