delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/14/18:10:54

From: fathert AT ibm DOT net (Tim Fathers)
Newsgroups: rec.games.programmer,comp.os.msdos.djgpp
Subject: Q. Interpreting DJGPP profile
Date: Thu, 15 May 1997 05:00:45 GMT
NNTP-Posting-Host: 139.92.16.130
Message-ID: <337a27eb.0@news1.ibm.net>
Lines: 25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

Sorry if these are dumb questions but I'm new to real-time programming
and DJGPP so please bear with me! As a first game project I have
written a small Space Invaders clone which I've almost finished and
I'm now trying to optimise. However, I'm having a bit of trouble
interpreting the results of GPROF and wonder whether anybody would be
able to help me (please!). In an attempt to measure the maximum
potential frame rate I set my game loop to run for 1000 frames and
temporarily removed the check for V-retrace and profiled. I noticed
that when I repeatedly profile the exact same program I get wildly
differing times (9.5-11.5 seconds total elapsed time). How can this
be? I've removed all random events from the loop but it doesn't help.
Also, can I change the sample rate of the profiler? It only seems to
measure time spent in each function to the nearest 0.01 of a second.
My blitters spend around 0.01-0.02s and I'm finding it very difficult
to get a good measure of whether my "optimisations" are actually
having any effect at all. Am I even tackling this whole problem the
correct way?
I've compiled the game with -O2 if it makes any odds.

I'd welcome any help with this and any other general advice... 
TIA,
Tim.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019