MEX function is slower than matlab script. Profiling possiblilites?

1 Ansicht (letzte 30 Tage)
Jan Kappen
Jan Kappen am 27 Jul. 2014
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

Antworten (0)

Kategorien

Mehr zu MATLAB Algorithm Acceleration finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by