Mail Archives: djgpp/1999/11/04/18:46:36
A good way to find how many times something is called without creating
overhead, is to make it count everytime it's used. Pseudo-C follows:
int cnt; cnt=0;
if(!mcount){ cnt++; }
I'm not too familiar with compression/decompression routines though.
Jon
In article <38215F61 DOT 35BDEC90 AT mpx DOT com DOT au>, infinity girl <entropic AT mpx DOT com DOT au>
wrote:
>hey all,
>
>
>i was profiling a program today, and i would just like to know which
>library functions call
>"mcount"? my program spends alot of time there. i thort maybe it was
>malloc..but not
>alot of time is spent in malloc at all.
>
>also, i was wondering if there is any way of making profiled programs
>run faster...i am profiling a text compression/decompression program,
>and it usually takes 11 seconds to compress a 2MB file, but with
>profiling it took over half an hour
>
>i understand there is alot of overhead..some of my functions were called
>hundreds of thousands of times {like the function to retrieve one bit
>from a buffered bitstream}.
>
>but still..half an hour??
>
>
>thanks fr any help,
>daniel.
>
>:)
- Raw text -