diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-25 19:20:29 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-25 19:20:29 +0100 |
| commit | 8d0c254f45f3754142996d45434a67ec7ebc5dd9 (patch) | |
| tree | 5ed904577967440cb7f9c37e9321d8f311f2f4d2 /bench | |
| parent | bd2aa935bfc2b377481ca5900d0d89168a507eae (diff) | |
remove cached pass_region from chunk
This wasn't well thought out because the regiojn gets dirtied after
every critter movement, even though it ignores critters by default.
Diffstat (limited to 'bench')
| -rw-r--r-- | bench/region.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bench/region.cpp b/bench/region.cpp index 0e2c460e..1e27800a 100644 --- a/bench/region.cpp +++ b/bench/region.cpp @@ -66,35 +66,34 @@ void Chunk_Region(benchmark::State& state) auto& c5 = make_chunk1(w[chunk_coords_{5, 0, 0}], false, true); auto& c6 = make_chunk1(w[chunk_coords_{6, 0, 0}], false, false); auto& c7 = make_chunk1(w[chunk_coords_{7, 0, 0}], true, true); - chunk::pass_region p; for (auto _ : state) { - { p = {}; c1.make_pass_region(p); + { auto p = c1.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt == p.bits.size()); } - { p = {}; c2.make_pass_region(p); + { auto p = c2.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt != 0 && cnt != p.bits.size()); } - { p = {}; c3.make_pass_region(p); + { auto p = c3.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt == 0); } - { p = {}; c4.make_pass_region(p); + { auto p = c4.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt != 0 && cnt < 100); } - { p = {}; c5.make_pass_region(p); + { auto p = c5.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt != 0 && cnt != p.bits.size()); } - { p = {}; c6.make_pass_region(p); + { auto p = c6.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt != 0 && cnt != p.bits.size()); } - { p = {}; c7.make_pass_region(p); + { auto p = c7.make_pass_region(); auto cnt = p.bits.count(); fm_assert(cnt != 0 && cnt != p.bits.size()); } |
