[Haskell-cafe] Fast JSON validation - reducing allocations
eric at seidel.io
Thu May 11 17:26:49 UTC 2017
On Thu, May 11, 2017, at 09:12, David Turner wrote:
> Could anyone help, e.g. by pointing me at the bit in the Core that is
> allocating within the main loop?
GHC has a -ticky flag that tracks precisely where allocations are
happening. It's quite low level (you may have to stare at the STG in
addition to the Core to interpret the results) but I've found it
incredibly useful when trying to understand performance swings in GHC's
You can enable it per module, which is nice break from the
rebuild-the-world -prof, but the flip side IIRC is that if the
allocations are happening in a module that wasn't compiled with -ticky
(e.g. somewhere inside Data.Array) you might not see them.
Hope this helps!
More information about the Haskell-Cafe