I have simply test case: 10 * 255 cold storm missiles.
They cause me to spend ~14ms per frame in scene tick and its children.
4ms of that is collision detection.
8ms of that is effect tick, pretty much only particle system (and particle) ticks.
Does anyone have any ideas how to improve it?
Following things i tried:
getting rid of "new" and managing static memory manually. (at most 1ms improvement, margin of error stuff)
changing m_vecParticle to an array (again at most ~1ms improvement)
moving some stuff out of the inner particle creation loop. (no change)
Nothing else seems obvious by itself, making me suspect bad memory access patterns leading to suboptimal cache use.
What i haven't tried yet is to get rid of the the object->bodycon->particlesystem->particle chain and do a breadth first list instead.
It doesn't seem obvious if that would help or not (it does for rendering but for ticks it shouldn't i feel).
Has anyone tried that yet?
I guess there is always the option of offthread or even multi threaded particle ticks but that is no fun at all.
They cause me to spend ~14ms per frame in scene tick and its children.
4ms of that is collision detection.
8ms of that is effect tick, pretty much only particle system (and particle) ticks.
Does anyone have any ideas how to improve it?
Following things i tried:
getting rid of "new" and managing static memory manually. (at most 1ms improvement, margin of error stuff)
changing m_vecParticle to an array (again at most ~1ms improvement)
moving some stuff out of the inner particle creation loop. (no change)
Nothing else seems obvious by itself, making me suspect bad memory access patterns leading to suboptimal cache use.
What i haven't tried yet is to get rid of the the object->bodycon->particlesystem->particle chain and do a breadth first list instead.
It doesn't seem obvious if that would help or not (it does for rendering but for ticks it shouldn't i feel).
Has anyone tried that yet?
I guess there is always the option of offthread or even multi threaded particle ticks but that is no fun at all.

