Compile time

Håkan Stenholm hakan.stenholm@REDACTED
Thu Mar 20 15:35:36 CET 2003


On torsdag, mar 20, 2003, at 09:02 Europe/Stockholm, DANIESC SCHUTTE  
wrote:

> Morning everyone,
>
> I have got a question about the time it takes to copile a script,  I  
> have got a script that that takes about 40 - 60 seconds to compile - (  
> I included the source here - any idea why it would take so long?

It does indeed run slow on my machine as well (R9B0 on a PowerMac G4  
2x867 MHz), I'm not sure why it should be this slow but I noticed that  
you have a very large function with lots of nested case statements as  
well as that your case statements look like:

case .... of
     .... -> Var = ....
     .... -> Var = ....
     .... -> Var = ....
end

rather than the more common (and slightly more compact)

Var = case ... of
     .... ->  ....
     .... ->  ....
     .... ->  ....
end

You might try rewriting it this way to see if compiles more efficiently

>
> Am I making a gross mistake somewhere?
>
>
> ####################################################################### 
> ##############
> The information contained in this message and or attachments is  
> intended
> only for the person or entity to which it is addressed and may contain
> confidential and/or privileged material.  Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance  
> upon,
> this information by persons or entities other than the intended  
> recipient
> is prohibited. If you received this in error, please contact the  
> sender and
> delete the material from any system and destroy and copies.
> ####################################################################### 
> ##############
> <costing_manager.erl><int_trx.hrl>




More information about the erlang-questions mailing list