Sergey writes:

> You compile the following program for several minutes, with  -Onot.
> But is it really a hard business to parse them 40 expressions below, 
> of which  e1  is the largest one?
> I need this as just reading of the input data for other program.

I tried to reconstruct your example, just copying e1 to make e2-e40 (that's
a clever use of the monomorphism restriction, BTW :-), and compiled it:

~/scratch > ghc-nightly2 -Rghc-timing -Onot test121.hs -c
<<ghc: 263923968 bytes, 756 GCs, 3998079/7287972 avg/max bytes residency (13
samples), 21M in use, 0.01 INIT (0.00 elapsed), 4.79 MUT (5.22 elapsed),
4.96 GC (5.03 elapsed) :ghc>>

Ok, not exactly fast, but not on the order of several minutes either.  And
you can halve the total time taken to compile the module by adding -fasm-x86
(with a recent CVS version of GHC).

So what were you doing differently?

Cheers,
        Simon

Reply via email to