众所周知,分析将关闭GHC的任何优化。使用RTS -T标志获取GC统计数据时是否也会发生这种情况?
答案 0 :(得分:3)
Detailed profiling doesn't turn off optimization, but each interferes with the other. Notably, inlining wreaks havoc on cost-center profiling, since the cost of inlined functions is assigned to their called.
RTS flags never affect optimization directly because they are passed to a program after it's been compiled. Of course RTS flags can and often do affect performance by changing the behavior of the garbage collector, collecting information about the program for profiling, etc.