#Performance issues with sand simulation and SDL2

12 messages · Page 1 of 1 (latest)

indigo carbonBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

mild rover
#

honestly the important thing to do would be to grap a profiler and see where things are going wrong

#

one thing I am noticing is allocating a particle on the heap again like this is a bit pointless: auto newParticle = std::make_unique<Particle>();

#

std::vector<std::unique_ptr<Particle>> cells; this can just be a std::vector<Particle> cells;

#

there is no super great reason to allocate the particle further on the heap

#

doing what you had now completly will wreck the cache for no real reason

#

right now it';s going to be important to run this with a profiler like I said before to get an exact feeling of where the performance is actually going

mild rover
#

just curious are running debug or release?

#

cause perf info in debug is pretty meaningless

#

atleast for profiling

#

can you share the hoth path there?

indigo carbonBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity