Related articles |
---|
Compilers producing assembly language uiucdcs!gatech!emory!arnold (1987-11-24) |
Re: Compilers producing assembly language harvard!drilex!dricej (1987-11-29) |
Re: Compilers producing assembly language allegra!utzoo!henry (1987-12-03) |
Re: Compilers producing assembly language gla@nixpbe.UUCP (1987-12-02) |
Re: Compilers producing assembly language haddock!csun!aeusesef (1987-12-06) |
Re: Compilers producing assembly language atbowler@orchid.waterloo.edu (1987-12-09) |
Re: Compilers producing assembly language rcd@ico.isc.COM (1987-12-10) |
Re: Compilers producing assembly language rcodi@yabbie.rmit.oz.au (1987-12-14) |
Newsgroups: | comp.compilers |
From: | rcd@ico.isc.COM |
Summary: | questionable generalization about lex time |
Date: | 10 Dec 87 05:32:31 GMT |
References: | <765@ima.UUCP> <26100001@nixpbe.UUCP> |
Organization: | Interactive Systems Corp, Boulder, CO |
In article <26100001@nixpbe.UUCP>, gla@nixpbe.UUCP writes:
...
> First, it is a performance reason.
> Lexical analysis takes about 30% of time in any compile/assembly
> program. This can be saved if the assembly step is integrated.
This is a rather rash generalization--the numbers probably run from 5% to
over 60% of time.
It is also a weak argument against the compiler generating assembly language.
If you're spending that much time lexing, either you've got a very fast
compiler system (in which case it doesn't matter much) or you've done an
abominable job on the lexer (in which case you can rework the lexer).
Bear in mind that the lexer of concern is the one for the assembler, not
the one for the compiler proper--and lexing assembly language <<ought>> to
be easy (thus amenable to simple tuning).
[This is not to say that it doesn't happen. I recall the early ETH Pascal
compilers spending something over 50% of their time in source input and lex
analysis. It was a combination of careless lexical analysis, a mediocre
text I/O system, and a very fast rest-of-the-compiler with trivial work in
the code generation.]
[I've heard that an astounding fraction of PCC's time is usually spent in
the printf() calls to write out the assembler code. -John]
--
Dick Dunn UUCP: {hao,nbires,cbosgd}!ico!rcd (303)449-2870
...CAUTION: I get mean when my blood-capsaicin level gets low.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.