home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / compiler / 1841 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.8 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!spdcc!iecc!compilers-sender
  2. From: henry@zoo.toronto.edu (Henry Spencer)
  3. Newsgroups: comp.compilers
  4. Subject: Re: Is this a new idea?
  5. Keywords: parse, performance
  6. Message-ID: <92-11-032@comp.compilers>
  7. Date: 8 Nov 92 04:36:51 GMT
  8. Article-I.D.: comp.92-11-032
  9. References: <92-10-113@comp.compilers> <92-11-009@comp.compilers>
  10. Sender: compilers-sender@iecc.cambridge.ma.us
  11. Reply-To: henry@zoo.toronto.edu (Henry Spencer)
  12. Organization: U of Toronto Zoology
  13. Lines: 23
  14. Approved: compilers@iecc.cambridge.ma.us
  15.  
  16. >[Scanning and parsing can be as much as half of the total time that a
  17. >compiler takes (so says Ken Thompson of his Plan 9 C compiler) and that is
  18. >quite amenable to incremental precalculation. -John]
  19.  
  20. Although the Plan 9 compiler is a very interesting design and the paper on
  21. it is very much worth reading, some of the comments need to be taken with
  22. a grain of salt.  He isn't doing ambitious optimization (note that he
  23. ignores `volatile' entirely), which will surely influence the distribution
  24. of time among phases.
  25.  
  26. I also recall a case (not a compiler and not Ken Thompson) where an
  27. authoritative claim was made that a precompiled binary format was
  28. necessary because re-reading the text file each time was too slow...  and
  29. on examination this appeared to be mostly the result of an input parser
  30. written so ineptly that it bordered on incompetence.  For the code I had
  31. to write, I ignored the precompiled binary -- its format was complicated
  32. and inconvenient -- and re-read the text file.  The performance impact was
  33. unnoticeable.
  34. -- 
  35. Henry Spencer @ U of Toronto Zoology, henry@zoo.toronto.edu  utzoo!henry
  36. -- 
  37. Send compilers articles to compilers@iecc.cambridge.ma.us or
  38. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  39.