From e9741774861c37b780929902a4c9fecfaa8cd2e2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 28 Feb 2023 17:04:43 +0100 Subject: test/bitmask: don't run benchmark warmup repeatedly --- test/bitmask.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/bitmask.cpp b/test/bitmask.cpp index 4deeca6e..2160928c 100644 --- a/test/bitmask.cpp +++ b/test/bitmask.cpp @@ -45,11 +45,11 @@ constexpr bool result[] = { std::chrono::high_resolution_clock clock; auto img = loader.texture(loader.SCENERY_PATH, "door-close"_s); auto bitmask = anim_atlas::make_bitmask(img); - constexpr int runs = 10, warmup = 100, cycles = 1000; + constexpr int runs = 10, warmup = 500, cycles = 1000; + for (int i = 0; i < warmup; i++) + anim_atlas::make_bitmask_(img, bitmask); for (int i = 0; i < runs; i++) { - for (int i = 0; i < warmup; i++) - anim_atlas::make_bitmask_(img, bitmask); auto time0 = clock.now(); for (int i = 0; i < cycles; i++) (void)anim_atlas::make_bitmask_(img, bitmask); -- cgit v1.2.3