Program compiled with -O2 exhibits much worse performance
A user on reddit reports that compiling the program with -O2 makes his program use a lot more memory.
https://www.reddit.com/r/haskell/comments/84qovv/an_example_of_code_where_ghcs_o2_makes_things/
It runs in constant memory without -O2 and leaks memory with `-O2. It seems worth investigating as
the example is quite small (< 1000 lines) and self-contained.
https://github.com/luispedro/TestingNGLESS
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |