[Haskell-cafe] Fast JSON validation - reducing allocations
dct25-561bs at mythic-beasts.com
Fri May 12 08:10:50 UTC 2017
On 11 May 2017 at 20:32, Ben Gamari <ben at smart-cactus.org> wrote:
> Something that I should have mentioned earlier is that STG has the nice
> property that all allocation is syntactically obvious: allocated
> closures manifest as `let`s. This makes it fairly easy to pick out
> possible allocation sites, even in large dumps.
Ah, that's very useful to know!
Armed with that knowledge, I came to the conclusion that the allocation was
for the sharing of the `nextState` variable. Inlining it brings it down to
20us and 22kB per iteration.
Getting closer, but it looks like waiting for 8.2 is a better answer.
Looking forward to it!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe