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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gfortran's speed and exe size

Status
Not open for further replies.

GerritGroot

Technical User
Nov 3, 2006
291
ES
Hi,

I got a simple half a page code, just to convert some file formats.

If I compile this with microsoft developer's studio I get around 122kB, while if I compile the same code with gfortran I get an executable of 651kB, more than 5 times as big!

Furthermore, the executable of gfortran is much much slower than the executable made by developer's studio. (I noticed the difference especially because I was running them in a USB stick).

Is this difference known?
Is there any way to avoid that?

Gerrit

 
How are you linking the developer studio version - with static or dynamic libraries? If you link it with static libraries, it can be quite large.

Also the developer studio Fortran compiler probably isn't Microsoft's: it is probably Intel or Compaq. Now that some of Intel's people are on the gcc team, the gcc compilers may become quicker. In the past it was faster on AMDs than on Intels, possibly because there were some AMD people on the gcc team.
 
Thank you xwb, I didn't know about gcc development being focussed on either Intel or AMD.

The non-free compiler is called "Microsoft Developer's Studio 1994-95", I haven't got an idea about what it's linking or not, but it doesn't matter too much as it's gfortran that creates slower and bigger executables, so I suppose it's gfortran that needs to be tinkered.
 
I've noticed a similar thing with gfortran too, at least with size. I have a program with a bunch of DLLs, and even the smallest (in terms of procedures) DLLs have a "base" size of about 600 KB. If you open the DLL with a DLL viewer (I use DLLexp), you can see that gfortran bundles some of its own procedures into the DLL; I'm not sure if other compilers do this.

I've never used any commercial Fortran compilers, so I can't compare the execution speeds.

--------------------------------------
Background: Chemical engineer, familiar mostly with MATLAB, but now branching out into real programming.
 
Sounds like what you're describing is MS Powerstation. That got sold off to Compaq (CVF) and then to Intel (IVF). I still have powerstation somewhere. I'll have a look if the machine still starts up.
 
Yes, it works perfectly under XP, it's called "Microsoft Developer's Studio" (MSDEV) and I remember that the new (following) version was from Compaq indeed as you say.

Nevertheless, the point is not about MSDEV. The point is about gfortran. I didn't find anyone who could compile it for me with Compaq's (newer) version, but I suppose that a difference will be noted as well between the executables for that comparison (Compaq vs. gfortran).
 
Compaq's version (CVF) needs VS2003. You can get IVF on a one month trial from


but it needs Visual Studio 2005 or 2008 and at least a PIV CPU. It will not install on a PIII or an Atom. They will give you a one month evaluation licence. It is fast but I decided against buying it as it was very picky about which processors it would install on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top