View Full Version : more speed!
Hi every one
I wrote a program in matlab and for getting more speed wrote part of that in mex. when I run the program the speed is become slower :confused:, could you help me to khowing what is my problem?
best regards
Zeynab
is there any one!
PLZ help me...
I want a fast element_wise multiplication algorithm, I found that matlab multiplication has more speed than c common algorithm(that has 2 for)
Thank alot in advance:)
Bill Press
06-05-2009, 07:32 PM
If you are doing something that MATLAB already knows how to optimize (that is, not using explicit loops) then it is unlikely that you'll be able to get anything faster.
Otherwise, if you use MEX functions, be sure that you are not copying a lot of data back and forth on each call. For speed, you should read and write directly into the MATLAB memory space (which MEX allows you to do).
Hope this helps.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.