Re: A funny yet crazy extreme test on Delphi 7 compiler
- From: John Stoneham <captnjameskirk@xxxxxxxxx>
- Date: Fri, 25 Jan 2008 12:00:34 -0800 (PST)
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!
.
- References:
- Prev by Date: Re: Finding a settings file (FINALLY FOUND IT!)
- Next by Date: Re: PC Anywhere and Delphi Apps
- Previous by thread: Re: A funny yet crazy extreme test on Delphi 7 compiler
- Next by thread: Re: A funny yet crazy extreme test on Delphi 7 compiler
- Index(es):
Relevant Pages
|