TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: All
from: Paul Edwards
date: 1995-12-25 22:38:08
subject: pdpclib

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)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.