mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 06:44:17 +01:00
Merge pull request #4480 from lioncash/optimize
tests/core_timing: Remove pragma optimize(off)
This commit is contained in:
commit
b2911421ec
@ -46,20 +46,16 @@ struct ScopeInit final {
|
|||||||
Core::Timing::CoreTiming core_timing;
|
Core::Timing::CoreTiming core_timing;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma optimize("", off)
|
|
||||||
|
|
||||||
u64 TestTimerSpeed(Core::Timing::CoreTiming& core_timing) {
|
u64 TestTimerSpeed(Core::Timing::CoreTiming& core_timing) {
|
||||||
u64 start = core_timing.GetGlobalTimeNs().count();
|
const u64 start = core_timing.GetGlobalTimeNs().count();
|
||||||
u64 placebo = 0;
|
volatile u64 placebo = 0;
|
||||||
for (std::size_t i = 0; i < 1000; i++) {
|
for (std::size_t i = 0; i < 1000; i++) {
|
||||||
placebo += core_timing.GetGlobalTimeNs().count();
|
placebo = placebo + core_timing.GetGlobalTimeNs().count();
|
||||||
}
|
}
|
||||||
u64 end = core_timing.GetGlobalTimeNs().count();
|
const u64 end = core_timing.GetGlobalTimeNs().count();
|
||||||
return (end - start);
|
return end - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma optimize("", on)
|
|
||||||
|
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
TEST_CASE("CoreTiming[BasicOrder]", "[core]") {
|
TEST_CASE("CoreTiming[BasicOrder]", "[core]") {
|
||||||
|
Loading…
Reference in New Issue
Block a user