Prev: Matlab Fuzzy
Next: .exe
From: Vikas Bajpai on 21 Apr 2010 02:09 I made a program which performs a particular operation on an image as a whole and this program takes 2.59 seconds to execute but when i performed the same operation by dividing the image in four equal halves then program took 0.11 seconds. Why this thing is happening as this doesn't sound practically feasible ?
From: Rune Allnor on 21 Apr 2010 05:21 On 21 apr, 08:09, Vikas Bajpai <vikas.bajpa...(a)gmail.com> wrote: > I made a program which performs a particular operation on an image as > a whole and this program takes 2.59 seconds to execute but when i > performed the same operation by dividing the image in four equal > halves then program took 0.11 seconds. Why this thing is happening as > this doesn't sound practically feasible ? "Four equal halves"? As for matlab, it *is* slow. That's the way it is. You as user get the benefits of simple-to-use functions. The price you pay is slow run-time performance. It is not unusual to see speed improvements on the order of 10x, 50x, or even 100x when porting a matlab program to some other programming language. But of course, one needs to know how to program that other language to obtain those improvments. Which means one needs to spend a lot of time (years) learning and training, to master those other languages. Rune
From: Vikas Bajpai on 21 Apr 2010 05:52 On Apr 21, 2:21 pm, Rune Allnor <all...(a)tele.ntnu.no> wrote: > On 21 apr, 08:09, Vikas Bajpai <vikas.bajpa...(a)gmail.com> wrote: > > > I made a program which performs a particular operation on an image as > > a whole and this program takes 2.59 seconds to execute but when i > > performed the same operation by dividing the image in four equal > > halves then program took 0.11 seconds. Why this thing is happening as > > this doesn't sound practically feasible ? > > "Four equal halves"? > > As for matlab, it *is* slow. That's the way it is. You as user > get the benefits of simple-to-use functions. The price you pay > is slow run-time performance. > > It is not unusual to see speed improvements on the order of 10x, > 50x, or even 100x when porting a matlab program to some other > programming language. But of course, one needs to know how to > program that other language to obtain those improvments. Which > means one needs to spend a lot of time (years) learning and > training, to master those other languages. > > Rune no sir i have implemented the second program in Matlab as well the only thing change which i have made is that initially i was performing a particular operation on the image as a whole and later i implemented the same technique bu dividing the image in four equal halves and found such a drastic change in the elapsed time.
|
Pages: 1 Prev: Matlab Fuzzy Next: .exe |