Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About C++ and Delphi and Java..

0 views
Skip to first unread message

amin...@gmail.com

unread,
Feb 23, 2020, 8:11:54 PM2/23/20
to
Hello,


About C++ and Delphi and Java..

In C++, the #include keyword is basically single-handedly responsible for murdering the productivity of C++ programmers around the world. I would guesstimate that billions and billions of dollars have been wasted waiting for C++ programs to build, and it is largely the fault of the #include keyword. Include is different from Delphi’s “uses” and C#’s “using” keywords in that, in the “uses/using” paradigm, the files being used are considered to be precompiled. “Include” does not allow the included file to be precompiled (without essentially tricking the compiler using precompiled headers). Things that happen in the file before the #include can affect things that happen in the included file (essentially the all included files are first merged into one large file before being compiled).

As a result of this silly and rarely useful rule, the same file often gets recompiled hundreds or even thousands of times in a single build operation. If you have hundreds of files, you get to waste lots of time by the company water cooler or check up on your facebook buddies. I have one embedded C app, designed for a device that has a measily 96k of RAM that takes 5+ minutes to compile with all 8 VCores of my i7 machine pegged at 100%. This is for a target that has a measily 96k of RAM and 512K of flash! This is unacceptable. This has always been unacceptable. This will always be unacceptable and it is another reason why C++ can’t be the language of the 21st century.


More about compile time and build time..

Look here about Java it says:


"Java Build Time Benchmarks

I'm trying to get some benchmarks for builds and I'm coming up short via Google. Of course, build times will be super dependent on a million different things, but I'm having trouble finding anything comparable.

Right now: We've got ~2 million lines of code and it takes about 2 hours for this portion to build (this excludes unit tests).

What do your build times look like for similar sized projects and what did you do to make it that fast?"


Read here to notice it:

https://www.reddit.com/r/java/comments/4jxs17/java_build_time_benchmarks/


So 2 million lines of code of Java takes about 2 hours to build.


And what do you think that 2 millions lines of code takes
to Delphi ?

Answer: Just about 20 seconds.


Here is the proof from Embarcadero, read and look at the video to be convinced about Delphi:

https://community.idera.com/developer-tools/b/blog/posts/compiling-a-million-lines-of-code-with-delphi

C++ also takes "much" more time to compile than Delphi.


This is why i said previously the following:


I think Delphi is a single pass compiler, it is very fast at compile time, and i think C++ and Java and C# are multi pass compilers that are much slower than Delphi in compile time, but i think that the generated executable code of Delphi is still fast and is faster than C#.



Thank you,
Amine Moulay Ramdane.
0 new messages