[Haskell-cafe] Re: static constants -- ideas?

Don Stewart dons at galois.com
Fri Feb 29 14:35:10 EST 2008


jay:
> Don Stewart dons at galois.com:
> 
> >jay:
> >> Don Stewart dons at galois.com:
> >> >jay:
> >> >> Don Stewart dons at galois.com:
> >> >> >jay:
> >> >> >> I also have constants that are too large to compile. I am resigned to
> >> >> >> loading them from data files--other solutions seem even worse.
> >> >> ...
> >> >> >> Data.Binary eases the irritation somewhat.
> >> >> >
> >> >> >Did you try bytestring literals (and maybe parsing them in-memory with
> >> >> >Data.Binary)?
> >> 
> >> I finally squeezed enough time to try it, and it didn't work for me.
> >
> >> 
> >> --
> >> ghc Overflow.hs
> >> [1 of 1] Compiling Overflow         ( Overflow.hs, Overflow.o )
> >
> >Enable optimisations!  Compile with ghc -O2. You need this to avoid
> >having a very slow pack call at runtime.
> 
> Yes, I tried basic variations like that. The result is the same with -O1
> or with -O2, and with Data.ByteString or Data.ByteString.Lazy .

Ok, hmm, that really shouldn't be the case. Do you have the example 
available somewhere? It's just a 40M inline bytestring?

-- Don


More information about the Haskell-Cafe mailing list