Bläddra i källkod

benchmark: minor changes

Michele Caini 6 år sedan
förälder
incheckning
972470ad42
2 ändrade filer med 10 tillägg och 9 borttagningar
  1. 2 1
      TODO
  2. 8 8
      test/benchmark/benchmark.cpp

+ 2 - 1
TODO

@@ -22,9 +22,10 @@ Next:
 * replace observer class with observer functions
 * get(cmp, entity) -> void *, set(cmp, entity, void *)
 * review multi component views to reduce instantiations once empty types are gone...
-* accept fixed type iterators like std::container<T> does rather than all possible types
+* move signals down to the storage class?
 
 * WIP:
+ - introduce the component iterators for non-contiguous collections of entities (multi component views, observers, user defined collections)
  - deprecate snapshot, loader, ...
  - provide documentation to describe alternatives
 

+ 8 - 8
test/benchmark/benchmark.cpp

@@ -64,10 +64,10 @@ void pathological(Func func) {
     });
 }
 
-TEST(Benchmark, Construct) {
+TEST(Benchmark, Create) {
     entt::registry registry;
 
-    std::cout << "Constructing 1000000 entities" << std::endl;
+    std::cout << "Creating 1000000 entities" << std::endl;
 
     timer timer;
 
@@ -78,22 +78,22 @@ TEST(Benchmark, Construct) {
     timer.elapsed();
 }
 
-TEST(Benchmark, ConstructMany) {
+TEST(Benchmark, CreateMany) {
     entt::registry registry;
     std::vector<entt::entity> entities(1000000);
 
-    std::cout << "Constructing 1000000 entities at once" << std::endl;
+    std::cout << "Creating 1000000 entities at once" << std::endl;
 
     timer timer;
     registry.create(entities.begin(), entities.end());
     timer.elapsed();
 }
 
-TEST(Benchmark, ConstructManyAndAssignComponents) {
+TEST(Benchmark, CreateManyAndAssignComponents) {
     entt::registry registry;
     std::vector<entt::entity> entities(1000000);
 
-    std::cout << "Constructing 1000000 entities at once and assign components" << std::endl;
+    std::cout << "Creating 1000000 entities at once and assign components" << std::endl;
 
     timer timer;
 
@@ -107,11 +107,11 @@ TEST(Benchmark, ConstructManyAndAssignComponents) {
     timer.elapsed();
 }
 
-TEST(Benchmark, ConstructManyWithComponents) {
+TEST(Benchmark, CreateManyWithComponents) {
     entt::registry registry;
     std::vector<entt::entity> entities(1000000);
 
-    std::cout << "Constructing 1000000 entities at once with components" << std::endl;
+    std::cout << "Creating 1000000 entities at once with components" << std::endl;
 
     timer timer;
     registry.create(entities.begin(), entities.end());