Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Visual Basic Free Edition


  • Please log in to reply
18 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

There is a pretty complete C/C++ compiler analysis available at Dr.Dobbs web site. They look at 7 different well-known compilers, including GNU C/C++ and 3 versions of MS C++, on several situations. Not biased and well done.

That's a great article. I've often wondered about the code size differences among compilers, so it's good to hear that MSVC++ 7.1 (which I currently use) excels in this area.

Their conclusion that the Intel C++ compiler performs "streets ahead of the rest" leads me to try to compile AHK with it someday and benchmark/compare. If anyone has compiled AHK on the Intel C++ compiler (or is willing to try), please let me know.

savage
  • Members
  • 207 posts
  • Last active: Jul 03 2008 03:12 AM
  • Joined: 02 Jul 2004

GCC isn't bad but really generated big exes/dlls (more than twice the size of those generated by VC++6).


Zuh? Did you strip the exes after they were compiled? Did you generate debug info? I've always found that gcc produces smaller than binaries than vc6. If you're comparing to a release build than you should strip debug symbols with gcc -s binary.exe first.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

Did you strip the exes after they were compiled? Did you generate debug info?

No, I just imported the VC++ project in the IDEs (Dev-CPP and Code::Blocks), supposing they would do such job by themselves in release mode.
gt2 tells me that "Line numbers stripped from file, Local symbols stripped from file, Debugging information is stored separately in a .dbg file" in the DLL I made.
gcc -s doesn't work on my gcc version (3.4.2) but there is a strip.exe utility with it. Running strip on SciLexer.dll shrinked down the file from more than 800KB to 640KB, which is much better, but still bigger than the 456KB file produced by VC++6.
The mentioned Dr.Dobbs' article seems to validate this feeling, as GCC is reported to produce the bigger and slower binaries.

@Chris: Intel C++ compiler has always been hailed as being the best, which is understandable as its job is to produce bytes to be crunched by the processor they make...
Alas, it is not free (except on Linux, it seems), and I can't afford to buy software nowadays.
Digital Mars has good figures, I downloaded it some months ago, I should try and install it. It is often forgotten when people mention free compilers, perhaps because it has limited capabilities some years ago. According the the article, it is now in par with the best compilers.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

GoDelphi
  • Guests
  • Last active:
  • Joined: --

Borland used to provide an interesting and free "C++ BuilderX Personal Edition" IDE also but it's not available anymore and I couldn't find anywhere to download it today.

In 10 days TurboExplorer will be out! They will be offering completely free versions and Pro level versions at about 1/2 the current price.

http://www.turboexplorer.com/

check it out...