Morning all,

On 11 May 2017 at 20:32, Ben Gamari <ben@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.

https://github.com/DaveCTurner/json-validator/commit/ec994ec9226ca7bc2e76f19bef98f42e0b233524

Getting closer, but it looks like waiting for 8.2 is a better answer. Looking forward to it!

Cheers,