Re: A funny yet crazy extreme test on Delphi 7 compiler



On Jan 25, 1:23 am, "Qi" <kbasm....@xxxxxxxxxxxxxxxxx> wrote:
...
Hardware: really poor. Pentium 4, maybe 2.4G HZ? Don't know.
It's at least 3 or 4 years old! The RAM is 1G.

As someone else stated, that's not "really poor", it's "really
average" (actually, I'd say 512MB RAM is about average). I've got a
brand-new laptop with the same specs.

Software: Delphi 7, I use the command line tool dcc32 to
do the compile. OS is Win2000, with some memory consuming
program running, such like MS Outlook, Eclipse, etc.

Um, "etc"? Starting out with such clearly defined parameters, I can't
wait to see how conclusive the results will be!


The test project:
A project with a major source file names TestCase.pas.
TestCase.pas has 121263 (120K) lines of code, and the
file size is more amazing, 62,570,543 bytes (59.6M).
You can see the average line length is about 500 characters,
it's very long.

Oh, well I see that we are testing actual, real-world, every-day
applications... or not! I'm not sure I see the point in this.

...
The result is amazing according to following points:
1, Delphi can handle so large source file. I suspect (but not verify)
many compilers can't process a source file with 60M size or 120K
lines of code.

I suspect that there are many compilers today which *can't* handle
files of that size. IIRC, file size restrictions were done away with
when we got 32-bit compilers.


2, Delphi can compile crazy functions with 999 parameters. In the
real life, no one will write a function with so many parameters,
but at least it's proving Delphi's capability.

I'm not sure what this proves. Delphi specs say that a function can
have no more than 999 parameters, so it shouldn't be surprising that
the compiler actually works within the spec.


3, The exe compiled by Delphi works quite OK. So the huge file
doesn't drive Delphi crazy. :-)

Again, what does this mean? A 16MB exe is not that big, regardless of
the original source code size. And how would you define a crazy
compiler?


4, The peak memory used by dcc32 is about 250M. It's not so much
considering a 60M source file.

And you're comparing this with...? How about something simple like
using different file sizes. What's the memory usage for a 6MB source
file? Or a 6KB source file? With an empty source file? This statistic
by itself is meaningless.


5, The compiling time is amazing. 1000 seconds is only about 16
minutes, it's really fast enough. I expect a C++ compiler may
need several hours to compile that huge file.

Huh? That's 120 loc per second. Ten years ago gcc could compile 800
lines per second on a 166mHz processor, according to the GCC faq that
came with DJGPP years ago.


Conclusion:
Though this test is only a derived work of testing my another
project, we have already seen the capability of processing huge
source files in Delphi. It's amazing, and great!

If you say so. Well, at least somebody had some fun!
.



Relevant Pages

  • Re: Looking for a free basic compiler for DOS
    ... mother of an ide file - and created separate source files for each SUB ... big to compile in one bc step. ... the source for all the SUBS in the same source file. ...
    (comp.lang.basic.misc)
  • Re: disabling parse error in gcc
    ... typedef struct MYSTRUCT{ ... it will compile correctly. ... A header file shall permit multiple inclusion of itself. ... so that a source file containing only TWO #includes of it will compile, ...
    (comp.unix.programmer)
  • Re: automatically remove unused #includes from C source?
    ... compile error, then the tool cannot assume that file1.h is a -necessary- ... I don't mechanically automate the code change and test process. ... by source file) and check to see whether ... Once you get beyond standard C into POSIX or system dependancies, ...
    (comp.lang.c)
  • A funny yet crazy extreme test on Delphi 7 compiler
    ... See how Delphi compiles very huge source file! ... I use the command line tool dcc32 to ... A project with a major source file names TestCase.pas. ... Delphi can compile crazy functions with 999 parameters. ...
    (borland.public.delphi.non-technical)
  • Re: Summary: translation units, preprocessing, compiling and linking?
    ... > proper, assembly and linking, always in that order. ... that specifies that a file have a particular extension, ... you can call your main source file ... something a source file is if you instruct your compiler to compile it. ...
    (comp.lang.cpp)