| Next: startconsole errors on fedora-ds (FC5) |
| Author |
Message |
kabadi External

Since: May 05, 2006 Posts: 3
|
Posted: Fri May 05, 2006 10:21 am Post subject: How to compare algorithms in linux Archived from groups: comp>os>linux>misc (more info?) |
|
|
|
| I want to compare the performance of two algorithm. How do I do this on
linux. In matlab we have flops command for this purpose, is their any
such command in linux.
|
|
|
| Back to top |
|
 |
kabadi External

Since: May 05, 2006 Posts: 3
|
Posted: Fri May 05, 2006 10:31 am Post subject: Re: How to compare algorithms in linux [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
|
| I tried using time, but It does not take into account the fact that
other processes are also running. Like if my process is using 10% CPU
at some point and later it uses 40% CPU, i need a program which
accomodates this fact. It would help if i could get either teeh xaact
process time or number of computation steps.
|
|
|
| Back to top |
|
 |
Larry Gagnon External

Since: Dec 09, 2005 Posts: 40
|
Posted: Fri May 05, 2006 11:41 am Post subject: Re: How to compare algorithms in linux [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Fri, 05 May 2006 10:21:51 -0700, kabadi wrote:
> I want to compare the performance of two algorithm. How do I do this on
> linux. In matlab we have flops command for this purpose, is their any
> such command in linux.
"man time" |
|
| Back to top |
|
 |
stan External

Since: Aug 26, 2005 Posts: 240
|
Posted: Fri May 05, 2006 5:24 pm Post subject: Re: How to compare algorithms in linux [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
kabadi.DeleteThis@gmail.com wrote:
: I want to compare the performance of two algorithm. How do I do this on
: linux. In matlab we have flops command for this purpose, is their any
: such command in linux.
check out the "time" command- it should do what you are looking for.
Stan
--
Stan Bischof ("stan" at the below domain)
www.worldbadminton.com |
|
| Back to top |
|
 |
kabadi External

Since: May 05, 2006 Posts: 3
|
Posted: Sat May 06, 2006 1:09 am Post subject: Re: How to compare algorithms in linux [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Larry Gagnon wrote:
> On Fri, 05 May 2006 10:21:51 -0700, kabadi wrote:
>
> > I want to compare the performance of two algorithm. How do I do this on
> > linux. In matlab we have flops command for this purpose, is their any
> > such command in linux.
>
> "man time"
Does anybody have a script which does the same function in linux as
flops does in matlab. Can I run some program which would help me in
determining the number of computation steps taken by an algorithm. |
|
| Back to top |
|
 |
John-Paul Stewart External

Since: Mar 29, 2005 Posts: 1520
|
Posted: Sat May 06, 2006 10:55 am Post subject: Re: How to compare algorithms in linux [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Jean-David Beyer wrote:
> kabadi RemoveThis @gmail.com wrote:
>
>>Larry Gagnon wrote:
>>
>>>On Fri, 05 May 2006 10:21:51 -0700, kabadi wrote:
>>>
>>>
>>>>I want to compare the performance of two algorithm. How do I do this on
>>>>linux. In matlab we have flops command for this purpose, is their any
>>>>such command in linux.
>>>
>>>"man time"
>>
>>Does anybody have a script which does the same function in linux as
>>flops does in matlab. Can I run some program which would help me in
>>determining the number of computation steps taken by an algorithm.
>>
>
> It depends on what you mean by a computation step. You can copy a test
> program that runs your algorithm with the profiler on, and then check the
> profile output if you want to know how often functions were called and how
> much time they took.
>
> man gcc (and look for -pg option)
>
> man gprof
In addition to gprof, Intel's VTune Performance Analyzer is availbe for
Linux. Depending on what the OP is doing, he may qualify for their
"free for non-commercial use" licensing option. Otherwise it's payware.
It does sound like the OP is needing some sort of profiler, though. |
|
| Back to top |
|
 |
|