MEX function is slower than matlab script. Profiling possiblilites?

1 回表示 (過去 30 日間)
Jan Kappen
Jan Kappen 2014 年 7 月 27 日
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 Center および File ExchangeMATLAB Algorithm Acceleration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by