Explorar el Código

fixed benchmark

Michele Caini hace 8 años
padre
commit
83b55f8e3f
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      README.md
  2. 2 2
      test/benchmark/benchmark.cpp

+ 1 - 1
README.md

@@ -191,7 +191,7 @@ Dell XPS 13 out of the mid 2014):
 | Benchmark | EntityX (compile-time) | EnTT |
 |-----------|-------------|-------------|
 | Create 1M entities | 0.0167s | **0.0046s** |
-| Destroy 1M entities | 0.0053s | **2.8e-06s** |
+| Destroy 1M entities | 0.0053s | **0.0039s** |
 | Standard view, 1M entities, one component | 0.0012s | **1.9e-07s** |
 | Standard view, 1M entities, two components | 0.0012s | **3.8e-07s** |
 | Standard view, 1M entities, two components<br/>Half of the entities have all the components | 0.0009s | **3.8e-07s** |

+ 2 - 2
test/benchmark/benchmark.cpp

@@ -55,9 +55,9 @@ TEST(Benchmark, Destroy) {
 
     Timer timer;
 
-    for(auto entity: registry.view<int>()) {
+    registry.each([&registry](auto entity) {
         registry.destroy(entity);
-    }
+    });
 
     timer.elapsed();
 }