IB> I was interested in your PDPCLIB - although as it was written for OS2 a
IB> lot more work would be required to write a version for DOS.
I originally wanted to write it for OS/2, with NO restrictions
holding me back from optimizing it for that platform. However,
when I was writing the code, I didn't feel that very much of
it was OS/2-specific.
IB> As a first step I ran the performance tests using perf*.c and got the
IB> following results:
IB> fgets on text files
IB> -------------------
IB> Executing - perf2
IB> pcc time 38.51 seconds
IB> bcc time 25.71 seconds
If you have OS/2 as dual-boot, you could try EMX under OS/2 on the
same machine, to find out if PDPCLIB is likely to give a perfomance
boost. PDPCLIB really is optimized to buggery on that stuff though.
IB> Apart from the poor results for fgets on text, Pacific compares
IB> favourably (with Borland). I am at a loss to explain this - even though
IB> it only uses a 1024 char buffer this should not make that much
IB> difference.
I am not sure what you are at a loss to explain - the time that
Borland is better, or the time that Borland is worse.
From memory, what I did to get a performance boost:
1. For large binary reads, simply call the OS to read straight
from disk to user-buffer, bypassing the internal buffer.
2. For small binary reads, just call the OS at the optimum time,
I think I determined that to be every 6144 bytes.
3. For fgets, I used a sentinel, so that I only had to look for
a '\n', and once found, I would THEN stuff around looking for a
'\r' (if it exists) etc.
IB> I will try adapting some of the PDPCLIB code. Would you consider including
IB> typedefs for user defined types ULONG etc are obvious, but APIRET? I
IB> assume these are in OS2.h?
Yes, all that stuff is in os2.h, the functions are spec'd to return
those data types, so that's what I use. APIRET is an unsigned long.
I actually *HATE* things like ULONG, but it is what the function is
defined to return, so I use it.
I'm not sure what you want me to do. I am using those data types
because that is what the OS/2 call is spec'd to return. When writing
for DOS, that call needs to be replaced by _something_else_, so the
call, and return, will need to be changed anyway.
BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|