On Sunday 27 April 2014 12:51:50 mai...@virtual-winds.org wrote: > Thanks for your reply, > > That was my intend to write such a small routine that will sample the > CPU and automatically tune the various options in order to achieve > something reasonable for the user and machine. > > May be a bit off topic, but what do you mean exactly by "minimising > cache misses"? There is no disk access during calculation phase (which > is multithreaded).
I meant CPU caches misses. When iterating over data try to make sure it is contiguous in memory rather than dispersed all over the place. One example from typical 3D scenegraphs is updating world transformation matrices and bounding volumes. Ensuring that the matrix data for all nodes is contiguous (rather than the Nodes and all their other data being contiguous or scattered over memory) means that when iterating we will have fewer cache misses and therefore that your CPU will spend more time operating on your data rather than waiting for it to be transferred from main memory. This interactive demo gives you a good feel for relative access times of various cache levels and main memory. http://www.overbyte.com.au/misc/Lesson3/CacheFun.html As always, benchmark :) Have fun, Sean -- Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK Klarälvdalens Datakonsult AB, a KDAB Group company Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) KDAB - Qt Experts - Platform-independent software solutions _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest