Path: utzoo!attcan!uunet!portal!cup.portal.com!doug_rands_merritt From: doug_rands_merritt@cup.portal.com Newsgroups: comp.sys.amiga Subject: Re: Draco keywords : Update Message-ID: <6614@cup.portal.com> Date: 18 Jun 88 02:38:51 GMT References: <251@cadomin.UUCP> Organization: The Portal System (TM) Lines: 35 XPortal-User-Id: 1.1001.4407 Chris Gray is quoted (by Don Filipchuk) as saying: >Based on my work here at Myrias on an ANSI-C compiler, I can say that yes, >a preprocessor does add considerably to compile-time for C programs. Depends. The *standard* C preprocessor used with cc on Unix systems since the 70's does *not* "add considerably" to compile time. I timed it (the standard preprocessor) on a Unix system a few years ago. On large, *typical* programs (production code, and I tried a lot of different examples) it hit almost 50,000 lines per minute! By way of comparison, the C compiler itself averaged around 10,000 lines per minute. A very high level language compiler I wrote (which produced C as output) averaged 5,000 lines per minute on programs with simple constructs, and 2,500 lines per minute on typical programs with more complex constructs. This was on an Intel 310, which is a minicomputer-style machine based on the (ugh) 80286 with Vmebus interface. For various reasons I wrote a work-alike of the C preprocessor, and it averaged around 7,000 lines per minute in the same environment. Many preprocessors are equally slow. The reason that the *standard* C preprocessor (which is not, of course, used by Manx nor Lattice) is so blindingly fast, is that it uses just about every trick in the book. It is very difficult to make programs run at some kind of ultimate speed like this, but my hat is off to the author; you can't get much faster than that. It was only about 20% slower than "cp" (copy), which uses block buffering! So anyway, it all depends on which preprocessor you're talking about. Doug -- Doug Merritt ucbvax!sun.com!cup.portal.com!doug-merritt or ucbvax!eris!doug (doug@eris.berkeley.edu) or ucbvax!unisoft!certes!doug