www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/28/18:04:08

Message-ID: <329E325F.3FDE@gbrmpa.gov.au>
Date: Fri, 29 Nov 1996 08:47:08 +0800
From: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Reply-To: leathm AT gbrmpa DOT gov DOT au
Organization: Great Barrier Reef Marine Park Authority
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Optimization
References: <Pine DOT SGI DOT 3 DOT 93 DOT 961128220927 DOT 4515B-100000 AT gibson DOT eee DOT upd DOT edu DOT ph>

> something odd which no one seems to have mentioned until now (and it's
> surprising!) use the profiler! it will help quite a bit so you don't go
> digging blindly through your code for things to speed up...
 
> in my experience (actually somebody said this, and i found out for myself)
> more than 50% of the program execution happens in one or two functions..
> often even more than 50%..

Actually, if I have a subroutine, which contains a _lot_ of local
variables,
does malloc _really_ get called all the time? I profiled my texture
mapping
code, and found that the malloc() routine was taking up about 17% of the
program execution time.

Does this sound right? If it is, I think I will be moving to a lot of
globals instead...

Leathal.

- Raw text -


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