-add ecsID template function (get Component/System/Event ID, passes tests)
-removed some ECS mixins code
This commit is contained in:
parent
13c82acad4
commit
a926b79223
9 changed files with 138 additions and 123 deletions
16
tests/perf.d
16
tests/perf.d
|
|
@ -86,22 +86,22 @@ void afterEveryTest()
|
|||
|
||||
void smallTmpl()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CShort.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CShort].staticArray);
|
||||
}
|
||||
|
||||
void bigTmpl()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CBig.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CBig].staticArray);
|
||||
}
|
||||
|
||||
void multiSmallTmpl()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CShort.component_id, CLong.component_id, CInt.component_id, CUInt.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CShort, ecsID!CLong, ecsID!CInt, ecsID!CUInt].staticArray);
|
||||
}
|
||||
|
||||
void multiBigTmpl()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CLong.component_id, CInt.component_id, CUInt.component_id, CBig.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CLong, ecsID!CInt, ecsID!CUInt, ecsID!CBig].staticArray);
|
||||
}
|
||||
|
||||
@("AddEntities100k1comp2b") @(before, &smallTmpl)
|
||||
|
|
@ -138,25 +138,25 @@ void allocDealloc100k()
|
|||
|
||||
void smallTmplPreAlloc()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CShort.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CShort].staticArray);
|
||||
allocDealloc100k();
|
||||
}
|
||||
|
||||
void bigTmplPreAlloc()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CBig.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CBig].staticArray);
|
||||
allocDealloc100k();
|
||||
}
|
||||
|
||||
void multiSmallTmplPreAlloc()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CShort.component_id, CLong.component_id, CInt.component_id, CUInt.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CShort, ecsID!CLong, ecsID!CInt, ecsID!CUInt].staticArray);
|
||||
allocDealloc100k();
|
||||
}
|
||||
|
||||
void multiBigTmplPreAlloc()
|
||||
{
|
||||
tmpl = gEM.allocateTemplate([CLong.component_id, CInt.component_id, CUInt.component_id, CBig.component_id].staticArray);
|
||||
tmpl = gEM.allocateTemplate([ecsID!CLong, ecsID!CInt, ecsID!CUInt, ecsID!CBig].staticArray);
|
||||
allocDealloc100k();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue