简体   繁体   中英

Does RTS -T flag disable GHC optimization

It's known that profiling will turn off any optimization by GHC. Does that also happen when using RTS -T flag to obtain GC stats?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM