www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/21/04:46:43

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: compiler Optimizations (2)
Date: Sat, 21 Mar 1998 02:43:39 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 40
Message-ID: <35136FAB.74DE@cs.com>
References: <Ap4p9tu00YUx1_I1Q0 AT andrew DOT cmu DOT edu>
NNTP-Posting-Host: ppp205.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

James W Sager Iii wrote:
> 
> >Umm... if it's detailed algorithmic optimization, I may not be enough of
> >a help; I have a lot of general knowledge but I don't have a great deal
> >of detailed information about graphics optimization.  I would be happy
> >to take a crack at it though.
> 
> I'm sorry. I just meant compiler optimization.

Overall, the best optimization level for non-PGCC is -O2.  -O3 tries to
perform inlining, which sometimes speeds code up but also occasionally
slows it down.  -m486, -ffast-math, and -fomit-frame-pointer are also
good optimization flags.  The gcc docs list all of them.

> The troubles I had with the .dat files:
> A) I can't load a BITMAP into memory from a .dat file because I am unsure
> of the code...

Can't help with this, except to recommend the Allegro docs, but...

> B) I am unsure of whether the .dat file loads itself fully into memory.
> Since my game is a slow paced RPG, I have no need for all the BITMAPs
> to be in the memory, and there are ALOT of BITMAPs appx 1000+. I have
> other devious uses for the memory...

Remember about virtual memory.  Even if the entire datafile were loaded,
it would be paged out until actually used.  The only overhead would be
in loading the file in the first place.  As it is, I believe that
Allegro only loads those portions of a datafile that you actually
request.

hth

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I      |   mailto:fighteer AT cs DOT com   |
| God's final message to His Creation: | http://www.cs.com/fighteer/|
| "We apologize for the inconvenience."|     ICQ UIN#:  7406319     |
|                      - Douglas Adams |  http://www.mirabilis.com/ |
---------------------------------------------------------------------

- Raw text -


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