Slowdown in profiling - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Anton Lorenzen

The attoparsec parser of my small type checker parses a simple format into an IntMap of tokens. It runs in about 1.5 on all four cores in a normal build, but takes nearly 5 seconds on all four cores in a stack '--profile' build. Is that normal/expected?

Vladimir Ciobanu

Profiling builds are expected to be (significantly) slower, depending on a lot of things. The main culprit is probably the fact that the optimizer can't inline (as aggressively) because it needs to generate/delimit cost centers. This normally shouldn't be a problem since you should only be running this build to debug performance problems, not in "production".