From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP and Borland's compiler generated code size Date: 11 Nov 2000 15:40:18 -0800 Organization: InterWorld Communications Lines: 30 Sender: nate AT mercury DOT st DOT hmc DOT edu Message-ID: <83u29egjrx.fsf@mercury.st.hmc.edu> References: NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nntp1.interworld.net 973986018 92762 134.173.57.219 (11 Nov 2000 23:40:18 GMT) X-Complaints-To: usenet AT news DOT interworld DOT net NNTP-Posting-Date: Sat, 11 Nov 2000 23:40:18 +0000 (UTC) User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Julian Hsiao writes: > Hi, > > I'm currently taking a programming class and being short on budget, uses > DJGPP and Borland's free compiler and XEmacs for assignments. The > reason I uses both compilers is because I try to avoid using certain > constructs that only GCC or Borland provides (well, I guess the only way > to completely avoid that is to code while reading the C++ specs paper, > but I'll pass on that...). > > Either one worked quite well for my purpose (except for some reason, > violating the const declaration only results in a warning in both > compilers, but an error in CW, which is what my class uses), but I > noticed that DJGPP's generated binary size is considerably larger than > that of Borland compiler. With DJGPP, I pretty much always get ~200K > binaries while with Borland's compiler I get ~40K binaries. > > Being a fairly introductory class, most of the assignments are trivial > (implement a priority queue using a linked list, etc.), and no STL is > used. I turn on optimization when compiling with both compilers. > > Can someone please explain why this is the case? See FAQ section 8.13. -- Nate Eldredge neldredge AT hmc DOT edu