   Generic Particle System
  As far as i know, there are 2 ways to implement particle systems1. Have a dynamic buffer that you can update in c++ and then send to the card2. Have the shader perform all the calculations (not generic)Im in the process of creating a generic Particle system, in that i want to create a system where functions are provided in c++ that act on particles to give desired behaviour, such asopen dynamic bufferfor all particles in this source{   for all actions in this Sourced Action list   {  peform action on current particle   }}close dynamic bufferrender;where actions would be functions such asapplyForce;Select texture id from a sprite list;deform direction;scaling;rotation; etc etcAnd have it set up in directx with a dynamic buffer(disregard) of particle vertices, which i perform all the actions on, and then send the buffer to the gfx card.Now becuase i have to map and unmap the buffer each frame to update all the particles of each particle system, it gets really slow with lots of particle systems.Is there any techniques i could use to speed this up?   
  Well, you could try update at a constant step, say 20 fps and linearly interpolate between the keyframes. Then there are the obvious advice such as simd-izing, multithreading and such. Personally I find shader driving quite flexible nowadays, especially if you run on D3D10 HW.The idea of applying/calling special functions on a per-particle basis, if I got it right, is unlikely to ever give you stellar performance, and in general, I am not really sure providing a per-particle "action list" makes any sense.I suppose you're already duplicating data to avoid Read Maps, but maybe it's worth a check - can you confirm?   ;  When doing particle manipulation on the CPU, I'd try to design it for batch processing so you don't have to iterate over a list per particle (and possibly do several virtual function calls per particle).For a project I'm currently working on, I designed the software side of my particle system like this:class ParticleSystem<T>  .Affectors  .Particles  .Update(int updates)    for(1 to updates) foreach(affector in .Affectors)   affector.Update(.Particles);interface IAffector<T>  .Affect(T *particles, int start, int count)So each "affector" (probably identical to your actions) gets an entire list of particles to process and does its manipulation in there, in the optimal case requiring no further function calls and crunching through the calculations with SIMD as hard as the CPU can.The particle system also runs affector.Affect() in multiple threads, eg. if there are 40.000 particles, there could be four simultaneous calls where each gets 10.000 particles to process, so all CPU cores work in parallel (and it's scalable, too).   ;  Sorry, let me explain better.Each Particle Emitter has a list of actions it has to perform. Where in the update function, the list of particles is sent to each action.for all actions{   action.Affect(ParticleList);}As an unrolled suedo loop, it would look likeActions.Gravity.apply(ParticleList);Actions.Wind.apply(ParticleList);Actions.Direction.apply(ParticleList);etc etcThe reason im avoiding doing this on the card in a shader, is that as far as i know, it would mean me having to have a new shader for each type of particle system.   