diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-28 17:04:43 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-28 17:04:43 +0100 |
commit | e9741774861c37b780929902a4c9fecfaa8cd2e2 (patch) | |
tree | a7453d6c2e04269e6636b2959103fb0eb1317c0c /test | |
parent | dc4b30d53a7eee3c06be4fa4a10b1c9c456fe026 (diff) |
test/bitmask: don't run benchmark warmup repeatedly
Diffstat (limited to 'test')
-rw-r--r-- | test/bitmask.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |