Isn't the fact that when you create a brand new arena via VirtualAlloc the reason it was so slow?
As the very first time you touch the page the Windows COW system would be forced to map the page for real
and at the end of the sim you ditch the memory again
Would be easy to test...
Call ZeroStruct twice and only time the second call
Yeah, that is a good point - it could be that the VirtualAlloc call doesn't take much time but it's page faulting in the ZeroAlloc because Windows hasn't mapped it yet, which would argue I should have gone ahead and done the test of having threads have their own scratch arena... we should try that on the next stream.