I have just completed the fgets portion of pdpclib, but have
not released an update yet. One of the two important objectives
of pdpclib was to make fgets work as fast as possible. Here is
a program that exercises fgets...
#include
int main(void)
{
FILE *fp;
char buf[500];
fp = fopen("pdptest.in", "rb");
if (fp == NULL)
{
printf("couldn't open input file\n");
return (0);
}
while (fgets(buf, sizeof buf, fp) != NULL)
{
if (*buf == ',')
{
printf(buf);
}
}
fclose(fp);
return (0);
}
I trialled it, and got the following results:
Watcom = 24 seconds
Borland = 10 seconds
CSET = 8 seconds
PDPCLIB compiled with Watcom = 7 seconds
So a few surprising results, and in the end, PDPCLIB is doing
quite well actually! BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|