Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated ComponentsGenerator to use entity.CreateComponent()
- Loading branch information
Showing
47 changed files
with
360 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
PerformanceTests/PerformanceTests/Misc/NewInstanceActivator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
|
||
public class NewInstanceActivator : IPerformanceTest { | ||
const int n = 1000000; | ||
|
||
Type _type; | ||
|
||
public void Before() { | ||
_type = typeof(ComponentA); | ||
} | ||
|
||
public void Run() { | ||
for (int i = 0; i < n; i++) { | ||
createInstance(); | ||
} | ||
} | ||
|
||
void createInstance() { | ||
Activator.CreateInstance(_type); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
public class NewInstanceT : IPerformanceTest { | ||
const int n = 1000000; | ||
|
||
public void Before() { | ||
} | ||
|
||
public void Run() { | ||
for (int i = 0; i < n; i++) { | ||
createInstance<ComponentA>(); | ||
} | ||
} | ||
|
||
void createInstance<T>() where T : new() { | ||
new T(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
Tests/Tests/Entitas.CodeGenerator/Fixtures/Generated/AnimatingComponentGeneratedExtension.cs
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
Tests/Tests/Entitas.CodeGenerator/Fixtures/Generated/ComponentIds.cs
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
Tests/Tests/Entitas.CodeGenerator/Fixtures/Generated/MovableComponentGeneratedExtension.cs
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
Tests/Tests/Entitas.CodeGenerator/Fixtures/Generated/PersonComponentGeneratedExtension.cs
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
Tests/Tests/Entitas.CodeGenerator/Fixtures/Generated/Pools.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.