Hi, I made a very complicated orbit model for calculating the error motion of a spindle. If run my program it takes several days to end the calculation. I optimized my code using the profiler. However, my calculation still takes some days.... If I use the Matlab compiler (.exe) for my calculations, will this save a lot of calculation time compared with running my program just in Matlab? Any suggestion is welcome!
![]() |
0 |
![]() |
"Hermano Cappa" wrote in message <ik8jcs$dnh$1@fred.mathworks.com>... > If I use the Matlab compiler (.exe) for my calculations, will this save a lot of calculation time compared with running my program just in Matlab? Possibly not. Bruno
![]() |
0 |
![]() |
"Hermano Cappa" wrote in message <ik8jcs$dnh$1@fred.mathworks.com>... > > If I use the Matlab compiler (.exe) for my calculations, will this save a lot of calculation time compared with running my program just in Matlab? ====== Mathworks claims that the speeds should be about the same. I've seen cases, however, where the .exe is distinctly slower than the original M-code.
![]() |
0 |
![]() |
"Matt J" wrote in message <ik93s3$cie$1@fred.mathworks.com>... > > Mathworks claims that the speeds should be about the same. I've seen cases, however, where the .exe is distinctly slower than the original M-code. Can you provide a short code to illustrate? Bruno
![]() |
0 |
![]() |
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ikafvh$cji$1@fred.mathworks.com>... > "Matt J" wrote in message <ik93s3$cie$1@fred.mathworks.com>... > > > > Mathworks claims that the speeds should be about the same. I've seen cases, however, where the .exe is distinctly slower than the original M-code. > > Can you provide a short code to illustrate? ============= No, the example where I observed this was a long was a long piece of code, and a proprietary one, so I guess you'll have to take this with a grain of salt. I believe it had to do with a call to uigetfile(), and to test it, you might just try to compile a simple 1-line uigetfile command. The first run of the .exe will definitely be very slow, undoubtedly because it has to load certain GUI libraries for the first time, but I believe on subsequent runs it could still be a bit slow...
![]() |
0 |
![]() |
On Feb 25, 4:55=A0pm, "Hermano Cappa" <cappaste...@gmail.com> wrote: > Hi, > > I made a very complicated orbit model for calculating the error motion of= a spindle. If run my program it takes several days to end the calculation.= I optimized my code using the profiler. However, my calculation still take= s some days.... > > If I use the Matlab compiler (.exe) for my calculations, will this save a= lot of calculation time compared with running my program just in Matlab? > > Any suggestion is welcome! I'm not sure how this differs depending on what the program does, but I had a similar problem once. I spent 2 or 3 days writing some c-code (and compile it in Matlab), only to find out that it's slower than Matlab code. But it might still be worth a shot in your case.
![]() |
0 |
![]() |