Thanks. I have reported the bug:
http://d.puremagic.com/issues/show_bug.cgi?id=7595
On 02/26/2012 09:06 PM, Caligo wrote:
Once you have those two files, compile with this:
dmd -unittest t1.d bug.d
and then run t1:
./t1
The output you get should look like this:
...
[0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 1, 2, 0, 1, 0, 0]
I get:
...
[0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 1, 2, 0, 1, 0, 0
bug.d
>8>8
@trusted:
import std.datetime : benchmark;
import std.stdio: writefln, writeln;
alias double Real;
void ben(alias fun)(string msg, uint n = 1_000_000) {
auto b = benchmark!fun(n);
writefln(" %s %s ms", msg, b[0].to!("msecs", int)