diff options
-rw-r--r-- | entityx/Benchmarks_test.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/entityx/Benchmarks_test.cc b/entityx/Benchmarks_test.cc index c3e0ed3..bf0430b 100644 --- a/entityx/Benchmarks_test.cc +++ b/entityx/Benchmarks_test.cc @@ -107,19 +107,15 @@ TEST_CASE_METHOD(BenchmarkFixture, "TestDestroyEntitiesWithListener") { TEST_CASE_METHOD(BenchmarkFixture, "TestEntityIteration") { int count = 10000000; - vector<Entity> entities; for (int i = 0; i < count; i++) { auto e = em.create(); e.assign<Position>(); - entities.push_back(e); } AutoTimer t; - cout << "iterating over " << count << " entities with a component 10 times" << endl; + cout << "iterating over " << count << " entities, unpacking one component" << endl; ComponentHandle<Position> position; - for (int i = 0; i < 10; ++i) { - for (auto e : em.entities_with_components<Position>(position)) { - } + for (auto e : em.entities_with_components<Position>(position)) { } } |