On 2016-10-25 14:36, Stefam Koch wrote:
First perf data is in
The is measured with time src/dmd -c -ctfe-bc
old interpreter (without -ctfe-bc) :
real 0m6.839s
user 0m6.423s
sys 0m0.407s
new interpreter (-ctfe-bc)
real 0m0.549s
user 0m0.547s
sys 0m0.000s
LLVM Backend (-ctfe-bc -version=UseLLVMBackend) :
real 0m0.039s
user 0m0.027s
sys 0m0.010s
The compiled code was :
int bug6498(int x)
{
int n = 0;
while (n < x)
++n;
return n;
}
static assert(bug6498(10_000_000)==10_000_000);
Very impressive :)
--
/Jacob Carlborg