more speed!


znb
05-28-2009, 11:11 AM
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

znb
06-04-2009, 10:23 AM
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, 06: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.