From: whatfor AT mindspring DOT com (Jon DeMarks) Newsgroups: comp.os.msdos.djgpp Subject: Re: mcount, and gprof Date: Thu, 04 Nov 99 21:32:32 GMT Organization: MindSpring Enterprises Lines: 37 Message-ID: <7vstsa$ti8$2@nntp4.atl.mindspring.net> References: <38215F61 DOT 35BDEC90 AT mpx DOT com DOT au> NNTP-Posting-Host: d1.8a.9a.f0 X-Server-Date: 4 Nov 1999 21:29:46 GMT X-Newsreader: News Xpress 2.0 Beta #2 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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 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. > >:)