File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,11 +59,16 @@ void main()
5959 }
6060 else
6161 {
62+ import std.system : os;
6263 auto res = 10. benchmark! (testStd, testMir);
63- dout << " std = " << res[0 ] << endl;
64- dout << " mir = " << res[1 ] << endl;
65- dout << " speedup = "
66- << (double (res[0 ].total! " usecs" ) / res[1 ].total! " usecs" - 1 ) * 100
67- << " %" << endl;
64+ auto ratio = double (res[0 ].total! " usecs" ) / res[1 ].total! " usecs" ;
65+ dout
66+ << " --------------------------------------------" << endl
67+ << " mir speedup = " << cast (int )((ratio - 1 ) * 100_0) / 10.0 << " %" << endl
68+ << " std = " << res[0 ] << endl
69+ << " mir = " << res[1 ] << endl
70+ << " ............... " << size_t .sizeof * 8 << " bit " << os << " ............... " << endl
71+ << " --------------------------------------------"
72+ << endl;
6873 }
6974}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ struct UInt(size_t size)
8888 // /
8989 this (uint data)
9090 {
91- data[0 ] = data;
91+ this . data[0 ] = data;
9292 }
9393
9494 // /
You can’t perform that action at this time.
0 commit comments