Date: Wed, 24 Sep 1997 17:02:32 +0200 (IST) From: Eli Zaretskii To: Mike Darrett cc: djgpp AT delorie DOT com Subject: Re: question about bios/msdos speed In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 23 Sep 1997, Mike Darrett wrote: > I need to write a program that has *frequent* disk access, i.e. it > reads pieces of a MASSIVE data file, using fseek() to get to the regions > it needs. How massive is the file? If you need to seek a lot, maybe it's better to read it all into memory? In DJGPP, you can read a few megabytes without risking slow-down due to VM paging on most machines. > The question is, since I am assuming the msdos file io commands > are in real mode, does this pose a problem to djgpp's 32-bit protected > mode, i.e. will the cpu be switching back & forth bet. real/protected > mode? This is slow, correct? If you read the file in large chunks, it is not so slow as you might think. Try a simple benchmark and see for yourself. > Will using PMode instead of CWSDPMI be any help? Not really. Most of the overhead of the mode switch is NOT due to DPMI host internals.