Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sci34hub!sci!dc From: dc@sci.UUCP (D. C. Sessions) Newsgroups: comp.lang.pascal Subject: Re: EXE file size, C vs. Pascal Summary: Linker, not language Keywords: C, Pascal, MsDos Message-ID: <846@mgt3.sci.UUCP> Date: 13 Nov 90 15:28:26 GMT References: <16398@mentor.cc.purdue.edu> Reply-To: dc@mgt3.sci.com (D. C. Sessions) Organization: SCI Technology, Inc., Huntsville, Al. Lines: 29 In article <16398@mentor.cc.purdue.edu> nuspljj@mentor.cc.purdue.edu (Joseph J. Nuspl Jr.) writes: > >Over the past year, I have written several Unix-like commands -- cat, ls, ... >in Turbo Pascal 5.5. I have recently rewritten them in Turbo C++ hoping >to improve speed and/or reduce file size. The C compiled programs are >significanly larger. Cat in Pascal is ~3k, Turbo C ~17, DeSmet C ~10. > >BTW - I don't have time to code every thing in Assembler. > >Comments? Try writing a null program in each language. I think you'll find that it's not so much a function of language as of implementation. Currently, TP v5.5 has one of the better linkage editors around; it eliminates dead code fairly efficiently. (BTW: so does at least one Modula-2 system -- in fact, mine is better than TP.) For filters and the like, speed is going to be a function of I/O buffering anyway, and again this is implementation- rather than language-bound. The moral? Use the language that suits you, and forget about 'efficiency'. It's a moving target. -- | The above opinions may not be original, but they are mine and mine alone. | | "While it may not be for you to complete the task, | | neither are you free to refrain from it." | +-=-=- (I wish this _was_ original!) D. C. Sessions -=-=-+