Date: Sun, 8 Mar 1998 13:34:20 +0200 (IST) From: Eli Zaretskii To: Vincenzo Morello cc: djgpp AT delorie DOT com Subject: Re: _bios_disk() inefficiency In-Reply-To: <34FDC92D.23D8@tin.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 4 Mar 1998, Vincenzo Morello wrote: > I get very low performance in a DJGPP V2 program which has to read large > disk data in low level mode. > I use _bios_disk() to read the disk and the program runs *five times* > slower than in Borland real mode. You don't tell much about your program, so it's hard to give any smart advice. Theoretically, you could make a DJGPP version 1000 times slower if you, for example, called the BIOS for every byte you needed to read. Calling BIOS requires a mode switch which is slow, so you should make as few calls as you can. In particular, reading more of the disk at a time and then working on data in memory should speed your program a lot. In DJGPP, you could even read an entire diskette into memory in one swell whoop.