[Haskell-cafe] Performance difference between ghc and ghci

wren ng thornton wren at freegeek.org
Tue Feb 22 08:53:59 CET 2011

On 2/22/11 2:26 AM, C K Kashyap wrote:
> Hi,
> Is there a runtime performance difference between a haskell program running
> under GHCI vs in its compiled form?
> Especially for a long running program - as in, ignoring the initial setup
> time.
> If I understand right, in both case tree reduction is what is happening and
> performance should be similar.

GHCi doesn't perform any optimizations, so whenever you're running 
interpreted bytecode there's a significant performance hit. However, if 
you compile the code, you can run the compiled/optimized version from 
GHCi as well.

Live well,

More information about the Haskell-Cafe mailing list