From: Bruno Luong on 4 May 2010 09:29 "Michael " <michael.schmittNOSPAM(a)bv.tum.de> wrote in message <hrp62e$49h$1(a)fred.mathworks.com>... > > Because I already did a tic-toc test and experienced a speed gain of 25% (cf. my previous messages). With my last message I only replied to your (not sufficient) argumentation. You are funny Michael, earlier you ask ME to do the test order to convince YOU; please let me quote "...I would believe you would have better timing using the following test". That shows you don't really know what take time in the program, let alone knowing why. Yes I have done the test, it's no point for me to show the result here. It only takes two modifications and rerun the code. No big deal to do it, anyone can do it. The person who needs to be convinced is not me. Michael, if you are unable to show your test to backup what you claim, or avoid the simplest test that has been suggested, and avoid to face the fact that you are in the wrong path, the discussion ends here. Bruno
From: Michael on 4 May 2010 10:02 For the sake of peace: Mea maxima culpa. I did the following test: tic for m = 1 : 100 for n = 1 : 100 r = foo; end end toc clear r tic callfoo; toc with callfoo.c: void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { char text[200]; int m, n; for(m = 0; m<100; m++) { for(n = 0; n<100; n++) { strcpy(text, "r = foo;"); mexEvalString(text); } } return; } The MATLAB side of things took about 0.01 seconds, the mexEvalString implementation took about 0.86 seconds. Which really amazes me, since I definetely saw that speed gain for my original problem. Guess there must be something else wrong... Bruno, please take my apologies! We see: mexEvalString is (unfortunately!!) very slow...
First
|
Prev
|
Pages: 1 2 3 Prev: problem with symbolic integration Next: How can I compare 2 surfaces?? |