[jhc] Performance of lazy-lists

Robert Clausecker fuzxxl at gmail.com
Sat Nov 20 08:55:07 EST 2010


Hi folks!

I try to use this awesome compiler and have several questions.

1. I have this program (see atachement):

  Now, the first solution is faster with both ghc and jhc, but with jhc
it runs in something like O(n) instead of the second, which runs in
O(1). Why?

2. Are there any special CPP-flags to find out, whether my program is
compiled with jhc, if CPP is enabled?

I'm using the latest stable version.

Thank you very much for this nice compiler!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.hs
Type: text/x-haskell
Size: 398 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/jhc/attachments/20101120/d5c2968f/Main.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fibonacci.hs
Type: text/x-haskell
Size: 1236 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/jhc/attachments/20101120/d5c2968f/Fibonacci.bin


More information about the jhc mailing list