mirror of
https://github.com/edmccard/twoapple-reboot.git
synced 2025-08-15 17:27:26 +00:00
quick-n-dirty benchmark
This commit is contained in:
2
test/benchcmd
Normal file
2
test/benchcmd
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
-version=Benchmark -inline -release -O -I.. -I../src -g
|
||||||
|
|
@@ -246,3 +246,21 @@ unittest
|
|||||||
writeln("Testing decimal mode, CMOS(Strict.yes, Cumulative.yes)");
|
writeln("Testing decimal mode, CMOS(Strict.yes, Cumulative.yes)");
|
||||||
testDecimalMode!(CPU!("65C02", true, true))();
|
testDecimalMode!(CPU!("65C02", true, true))();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
version(Benchmark)
|
||||||
|
{
|
||||||
|
import std.datetime, std.stdio;
|
||||||
|
void f0()
|
||||||
|
{
|
||||||
|
testDecimalMode!(CPU!("65C02", false, false))();
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// auto milliExpected = (61886766.0 / 1020484.0) * 1000;
|
||||||
|
auto milliExpected = (64508206.0 / 1020484.0) * 1000;
|
||||||
|
auto r = benchmark!(f0)(1);
|
||||||
|
writeln(milliExpected / r[0].to!("msecs", int));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user