JoeHope
03-04-2002, 09:43 PM
I'm developing an XML-based cross-platform program for some arcane scientific purpose, and have discovered that the c++ compiler in DevTools is doing some pretty strange things. For example:
double some_array[1000000];
int main()
{
return(0);
}
goes to
-rwxr-xr-x 1 joe staff 80008512 Mar 5 14:31 whysobig
-rw-r--r-- 1 joe staff 56 Mar 5 14:30 whysobig.cc
I think 80 megabytes is a lot for an executable to do nothing. I discovered this curiosity when I was getting segmentation faults on OSX while the same program ran easily on many other machines with multiple other compilers and *nixes. gcc must be doing some extremely inefficient things under the hood.
I'm also having trouble forcing the complier to inline function calls - my main performance bottleneck. Is there a gcc option to do this?
Is there any way to improve this with gcc?
Are there any other free compilers for MacOSX?
If there are no better free compilers, which one should I buy?
double some_array[1000000];
int main()
{
return(0);
}
goes to
-rwxr-xr-x 1 joe staff 80008512 Mar 5 14:31 whysobig
-rw-r--r-- 1 joe staff 56 Mar 5 14:30 whysobig.cc
I think 80 megabytes is a lot for an executable to do nothing. I discovered this curiosity when I was getting segmentation faults on OSX while the same program ran easily on many other machines with multiple other compilers and *nixes. gcc must be doing some extremely inefficient things under the hood.
I'm also having trouble forcing the complier to inline function calls - my main performance bottleneck. Is there a gcc option to do this?
Is there any way to improve this with gcc?
Are there any other free compilers for MacOSX?
If there are no better free compilers, which one should I buy?