Extremely high memory usage in linking of cubix package with optimisation
Recently it was brought to my attention that the authors of the cubix
package reported on reddit to being unable to build their package with -O2
due to extremely high (>64 GB) memory utilization.
They say,
Because of performance problems in GHC, the full Cubix will not build with -O1 or -O2. We've tried on a server with 64GB RAM; the server ran out of memory.
and
Last month, we did manage to compile with -O2 successfully: on a server with over 200GB of RAM.
So clearly something is going very badly awry. They suggest that things explode during linking. However, I rather suspect that things first go off the rails during simplification.