Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi program size vs Visual Studio program size

Status
Not open for further replies.

mountainbrook

Programmer
May 30, 2002
1
US
In my current job I took over 3 related applications, 2 written in Delphi 5 and 1 in Visual Basic C++. I immediately noticed that the Delphi applications were considerably larger then the C++. I have experimented and written 2 very similiar appliactions and there is about a (10 to 20) to 1 difference in the size between the 2 with Delphi being the loser. Having been around awhile I am very sensitive to this, but because of the greater efficiency of implementation using Delphi I would like to switch to it exclusively. Why the huge difference. To me size usually equates to execution efficiency.

Thank you for any suggestions.

Dave.
 
To which type of language are you refering to?
Visual Basic C++ ??

Size doesn't equate execution efficiency

Delphi provides a complete encapsulation of the low-level Windows API using Object Pascal and the Visual Component Library. The penalty is that the executable file is larger, but not necessary slower.

If you are familiar with the windows api you can write direcly in Delphi and the size of the file would be almost the same as written in the C++ code.

If we come to the point of readability C++ could be the looser, but this depends of the programing skills and techniques of the coder. Inefficient programs can also be written in Delphi. Maybe somebody remembers the goto command that is still supported, although I have never used it.

Steven van Els
SAvanEls@cq-link.sr
 
I believe Delphi compiles quicker than C++ too, doesn't it?

C++, yuck, spit.

I'm not bias in any way [smile]

lou
 
Another issue is that the Delphi program stands alone. A VB program requires that you install the VB runtime on the machine. So sure, the VB program is 20K and the Delphi prog is 400K, but if you add in the size of the runtime environment, the VB program suddenly looks less competitive.

You can use that one VB runtime over a whole bunch of different programs, and get a saving that way; but
(a) you can pull the same trick with Delphi if you want (I don't advocate this);
(b) it leads to people's machines being littered with three or four different VB runtime versions (I've got a VB3 program I still run);
(c) it makes things easier to break and harder to troubleshoot. -- Doug Burbidge mailto:doug@ultrazone.com
 
Yes.. please stay away from VB - cant say too much for fear of litigation ;-).

Seriously though - size is not everything - lol. I know what you mean with regards file sizes as I have experimented with that myself. Im not sure how much more efficient the resulting programs is though.

C++ is a very powerful (and highly though of) language, but with the drawback of being a syntactic nightmare!(IMHO) I think that it depends on what you want to achieve and where you are starting from.

Given the performance of new PC's though - I think these issues are less important than they used to be. Productivity however is always important.


Opp.

P.S I think you can reduce file sizes in Delphi buy removing some of the "uses" inclusions (as these get compiled along side the program and can make it larger than need be.) Delphi often includes modules in new projects (by default) that are not really needed.

 
Don't be crazy!
VB programs are not standalone so they are smaller( But you most also add the size of VBRUNXXX.DLL and other dlls to your program size).
If you want to do this with your delphi programs, bulid them with runtime packages (Projects Option Dialog Box).
you will see the size of you program reduce from 400k to 40k or even smaller but you must have some VCL standard libraries you have used them in your project to run it.

AT LAST: Turbo Pascal programs are 15 to 17 times quicker than QBasic programs! (I don't know about delphi and VB but because VB is interpreter rather than compiler VB programs are always slower than Delphi programs both in compile and run).
 
I belive the Delphi compiler is as fast as it gets, but thats not important.
CBuilder code runs slightly faster that Delphi but not so you would notice.

The runtime advantages of Delphi outweigh this. Not to mention the most important thing. Delphi is nice to write, any form of 'C' isnt.

I agree with the comments on VB the support files required are huge and this from the people who supply the operating system!!.

Steve..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top