<div dir="ltr">Morning all,<div><br></div><div class="gmail_extra"><div class="gmail_quote">On 11 May 2017 at 20:32, Ben Gamari <span dir="ltr"><<a href="mailto:ben@smart-cactus.org" target="_blank">ben@smart-cactus.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
</span>Something that I should have mentioned earlier is that STG has the nice<br>
property that all allocation is syntactically obvious: allocated<br>
closures manifest as `let`s. This makes it fairly easy to pick out<br>
possible allocation sites, even in large dumps.<br></blockquote><div><br></div><div><br></div><div>Ah, that's very useful to know!</div><div><br></div><div>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.</div><div><br></div><div><a href="https://github.com/DaveCTurner/json-validator/commit/ec994ec9226ca7bc2e76f19bef98f42e0b233524">https://github.com/DaveCTurner/json-validator/commit/ec994ec9226ca7bc2e76f19bef98f42e0b233524</a><br></div><div><br></div><div>Getting closer, but it looks like waiting for 8.2 is a better answer. Looking forward to it!</div><div><br></div><div>Cheers,</div><div><br></div></div></div></div>