---- Running time & code efficiency ----

Siping Liu siping at cathedral.cerc.wvu.wvnet.edu
Thu Sep 6 00:40:11 AEST 1990


Hi. I am trying to analyze my C code and make it run faster.
The program is to translate files in one format to another.
I wonder if there is a generic way to decide a lower bound
of the running time for this kind of problem?
I know function calls consume time so I look through
the code and cut off some unnecessary ones;
I know you can trade space for speed, however I wonder how far
you can go along this direction. But I cannot get much from these
considerations. Any comments? Suggections?

What is your favorate tool for timing analysis? I used "prof" but
it did not give me the timing imformation for all functions in
my program -- just a few functions were listed. I also used the
system provided function called "times", it is pretty good.

The last questions: why doesn't the "time" command give me an identical
user time each time I run the same thing? In the "time"'s report,
is the time spent on the function calls by the system accounted in
the user time or system time?

Thank you for your help and have a nice day.

siping at cerc.wvu.wvnet.edu



More information about the Comp.unix.questions mailing list