MEX function is slower than matlab script. Profiling possiblilites?

1 次查看(过去 30 天)
Hey guys. I am working on a toolbox for realtime classification of driving situations. For this purpose I train a least squares SVM, see LS SVM. This one does rely heavily on solving linear systems in realtively highdimensional space (matrices about 200x40). I need to make a crossvalidation to ensure there is no overfitting, so I need to calculate the whole model a lot of times.
Now there is the problem, that the normal script version is about 3 times faster than the generated mex code (it was quite hard to make the whole thing capable for code generation...). Especially, if the dimension grow. The code should be vectorized well, so I think this is the "problem" for the c code?
I've disabled memory integrity, responsiveness to ctrl+c. May i tune the borders for dynamical memory a bit?
Or is there a way to profile the mex file, so I can see where the speeddown comes from?
Thank you very much! Jan

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Algorithm Acceleration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by