diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-07 20:52:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-07 20:52:57 +0100 |
commit | 90d479f07387927e9e5b5870f41309faff37aaed (patch) | |
tree | e1dd9fe3cbc6418492195dde3fe6a8cb1dd7c73f /test | |
parent | 10a72bb7d695fd36675198fd52b467fc66fcea17 (diff) |
a
Diffstat (limited to 'test')
-rw-r--r-- | test/bitmask.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/bitmask.cpp b/test/bitmask.cpp index 63fc9d15..a9552014 100644 --- a/test/bitmask.cpp +++ b/test/bitmask.cpp @@ -21,26 +21,6 @@ const unsigned char data_door_close[] = { #include "bitmask.embed.inc" }; -[[maybe_unused]] void bitmask_benchmark() -{ - 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 = 500, cycles = 1000; - for (int i = 0; i < warmup; i++) - anim_atlas::make_bitmask_(img, bitmask); - for (int i = 0; i < runs; i++) - { - auto time0 = clock.now(); - for (int i = 0; i < cycles; i++) - anim_atlas::make_bitmask_(img, bitmask); - std::chrono::duration<double, std::milli> time = clock.now() - time0; - - fm_log("[BENCH] bitmask %d/%d took %.1f ms", i, runs, time.count()); - } -} - void bitmask_test() { auto img = loader.texture(loader.SCENERY_PATH, "door-close"_s); |