Mail Archives: djgpp/2001/10/08/16:34:11
With all of my previous discussion about "benchmarking"
programs between vastly different compilers, it is most
interesting to note that nobody from DJGPP (here),
bothered to mention about 'gprof'
to make life easier for those who are not familiar with
'gprof' here's a little help:
@echo Creating a PROFILEs (GPROF)
@rem -s -Wall -O3
gcc -g -c %1.c -pg
gcc -o %1 %1.o -pg
@echo IF %1.EXE requires arguments, be sure to put them HERE!
%1.exe
gprof %1.exe gmon.out >OUTFILE
Examining the 'outfile' will reveal, apparently, various aspects of
your programs performance.
Interesting note is that a friend of mine and I have a program,
compiled under both Borland 5.02 and DJGPP 2.01,
Borland is FASTER then then DJGPP application in this instance,
and only a matter of a couple of seconds generally speaking.
The bottleneck is in a special function, and with /* */ around the
critical time-consuming area, 7 secs is the processing time,
removal of the /* */ shoots the processing time up to 14 or more
seconds.
UNDER DJGPP version, would there not be some way to discover
this fact directly and clearly using PROFILING? I mean what functions
are taking what overall part of the applications' execution time...
because right now, apparently, OUTFILE does not indicate the name of
the function where our bottleneck occurs....
ANY comments on this would be appreciated, thanks!
email: radsmail AT juno DOT com
http://members.tripod.com/~RadSurfer/
Join us on Yahoo at:
http://groups.yahoo.com/group/BorlandCPPBuilder
for informal discussions about all versions of C++Builder...
[Computer programming for Windows 95, and Console32]
(you must be a Yahoo member to join)
- Raw text -