[futurebasic] Re: [FB] FB5 Run mode

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2008 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Fri, 26 Sep 2008 13:33:01 +1200
Rich Love wrote:
> I am running on a dual processor 2ghz G5
> My project is approximately 40,000 lines
> It takes 3 minutes to compile a universal app.
> Takes 2 minutes to compile for PPC
>
> Is there anything else I can do to speed up the compile time?

Your compile time (with optimization level 0) is way out of line for  
conventionally structured code, and will not be improved by fiddling  
with settings.

IIRC, your project has an unusual structure, with a colossal main()  
function when translated into C. This seems to stress gcc 4.0.1, which  
copes with functions that are 1000s of lines long but not tens of 1000s.

Xcode 3.1 Developer Tools includes two new compilers (gcc-4.2 and llvm- 
gcc-4.2). FBtoC can be configured to use either of them instead of the  
default gcc. It is possible that one might be better for you than gcc  
4.0.1, but currently they both have a major restriction: the  
executables produced require OS X 10.5.

Reducing the size of main(), for example by eliminating gosubs, is  
therefore the best way to improve matters.

"Something"   ->   local fn Something
...                 ...
return             end fn

gosub "Something"  ->  fn Something


Robert P.