From: Julian Hsiao Newsgroups: comp.os.msdos.djgpp Subject: DJGPP and Borland's compiler generated code size Date: Sat, 11 Nov 2000 16:41:10 -0500 Organization: Carnegie Mellon University Message-ID: User-Agent: MT-NewsWatcher/3.0 (PPC) X-Complaints-To: newsabuse AT supernews DOT com Lines: 24 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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? Julian Hsiao madoka AT novastar DOT com