Re: [Haskell-cafe] Interesting effect of upgrading GHC
"Neil Mitchell" <[EMAIL PROTECTED]> writes: >> I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something >> rather unexpected. I recompiled an existing program (with -O2), and >> instead of taking 30 seconds to compile, it took roughly 2 seconds. > In previous releases, certain constructs took O(n^2) time to compile. > One that was a particular issue for me was: I've noticed that largish data structures - in my case, ~20x20 matrices - embedded in code seems to take a surprisingly long time to compile. (I haven't noticed (nor looked for) any speedup with new releases, though.) -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Interesting effect of upgrading GHC
Gwern Branwen wrote: FWIW, I was actually discussing compilation with -O2 on 6.8 with Sjannssen and he told me that even with -O2 turned on, GHC now defaults to -fasm instead of -fvia-c. Ah. Yeah, that could well make a big difference... (Especially on a machine with insufficient RAM.) Also, the release notes are talking about the runtime speed of binaries, not compilation. But since GHC is compiled with GHC, you would expect a (small) speedup of GHC. (And indeed that is what the release notes specifically suggest.) Either way, I (and probably a number of other people) will go test what speed difference it actually makes to compiled code. ;-) (I've been wondering for a while now whether there's much to choose between -fasm and -fvia-c.) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Interesting effect of upgrading GHC
On Nov 12, 2007, at 12:19 PM, Andrew Coppin wrote: Hi guys. I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something rather unexpected. I recompiled an existing program (with -O2), and instead of taking 30 seconds to compile, it took roughly 2 seconds. That's a really serious speedup! o_O Anybody have any idea what might have caused this? (Not, you understand, that I'm complaining! But the release notes say 10-15% faster, not 15,000% faster...) One of the main reasons for this is that GHC no longer defaults to compiling via C when -O2 is enabled. In 6.6.1, it would generate C code and then run the C compiler on that, by default. Now, by default, it just generates assembly code directly. Both C and assembly generation are available in both versions (using the -fvia-C and -fasm flags, respectively) but 6.8.1 improved the assembly backend enough that it made sense to make it the default. Aaron ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Interesting effect of upgrading GHC
Not sure if this is the case but if you don't delete the old object files and executable GHC may think that its job is already done and give up early. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Interesting effect of upgrading GHC
Hi > I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something > rather unexpected. I recompiled an existing program (with -O2), and > instead of taking 30 seconds to compile, it took roughly 2 seconds. In previous releases, certain constructs took O(n^2) time to compile. One that was a particular issue for me was: do return () return () return () Once you got to 100 return ()'s in a row GHC was totally useless, while Yhc and Hugs both had no problems. This particular problem was fixed, and I think a few others were as well - if one of those had tripped you up that may explain the speedup. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Interesting effect of upgrading GHC
Hi guys. I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something rather unexpected. I recompiled an existing program (with -O2), and instead of taking 30 seconds to compile, it took roughly 2 seconds. That's a really serious speedup! o_O Anybody have any idea what might have caused this? (Not, you understand, that I'm complaining! But the release notes say 10-15% faster, not 15,000% faster...) I am also curiose to see whether the compiled code execution speed is better/worse - but the program in question is mainly GUI, so I can't test it with that... Perhaps my Chaos program? ;-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe