Compiling with optimizations on hurts performance
The attached program runs many times slower when compiled with optimizations (4.5 seconds vs. 1.5 minutes on my machine).
I wasn't able to reduce the program to a small snippet so I attach the whole thing (including data files to process).
I compiled and ran like this:
ghc --make test2.hs time ./test2
And then
ghc --make test2 -fforce-recomp -O time ./test2
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |