Subj : Re: OO compilers and efficiency To : comp.programming From : Rob Thorpe Date : Mon Jul 25 2005 03:17 am > >> The equivalent Object Pascal code compiles in less than a second. > > > > There are many reasons for this, the biggest three are: > > 1. The object pascal compiler is very fast because it doesn't optimize > > much > > The pascal compilers optimize just as much. Do you actually have any evidence of that? Although it's possible for a compiler to optimize a Pascal program more aggresively than a C one, I've never seen a Pascal compiler as good as the good C ones. > > 2. Many C++ programmers write very sub-optimal makefiles > > 3. C++ has syntax that is difficult to parse, compared to C or Pascal > > for example > > C compilatoin is also slow. The entire concept of using include files to > share definitions is antiquated and inefficient. No matter how efficent > you make your include files, the compiler has to parse through them > character by character - for all the compiler knows, a header file > somewhere could have done > > #define while somefunction () In some cases it's very useful, but yes, it's certainly inefficient. .