www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/04/06:45:35

Date: Wed, 4 Sep 1996 13:27:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: operator AT student DOT driene DOT utwente DOT nl
Cc: djgpp AT delorie DOT com
Subject: Re: (stupid?) Questions...
In-Reply-To: <50grog$ch4@dinkel.civ.utwente.nl>
Message-Id: <Pine.SUN.3.91.960904131814.28311B-100000@is>
Mime-Version: 1.0

On 3 Sep 1996, Student wrote:

> In general...the file IO seems very, very slow...I compiled some version
> of DEU (Doom Editing Utility) with both DJGPP v1 and v2. I know v2 makes
> EVERYTHING protected mode, but the file io of DEU became extremely slow
> compaired to the v1 compiled version of DEU.

Can you give numbers, please?  What's the throughput (bytes/sec) of the 
v1 version as compared to v2 version, and how large are the files you 
read/write?  Some I/O-oriented info about your system (such as do you 
have any disk caches installed) would be also useful.

> Is there a way to improve file IO? (It's in the FAQ...but that doesn't 
> help me much ;-).) How can you limit the switches from RM <-> PM?

The mode switches are usually not the problem, especially if you compare 
DJGPP v1 and v2.  They both switch modes due to I/O at approximately the 
same rate.  If anything, v1 should do *more* mode switches, because its 
transfer buffer is smaller (4KB as opposed to 16KB in v2).

I suspect that the real problem is in some library function(s) that are
either used by the program in an inefficient way, or their implementation
should be improved.  But in order to find these functions, you will need
to profile the program and find its ``hot spots''.  I suggest you use the
`gprof' profiler which comes with DJGPP to do that (for details see
chapter 13 in the DJGPP FAQ list and the `gprof' docs). 

- Raw text -


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