[X-posting from Visual C++ forum]
Hi,
when running speed tests for a product, we have come across a performance oddity on Windows 8. Run time of the same program (with same arguments, environment, etc.) can vary by a factor of 2, which was not the case for earlier versions of Windows. We can deterministically
switch between the fast and the slow execution by changing seemingly unrelated things, like adding/removing an extra, unrelated environment variable before starting the program.
When inspecting the behavior of the program in VTune, we find that near 100% of the extra time is spent RtlpSubSegmentInitialize (with some other functions pointing towards the low fragmentation heap further up the call stack).
The benchmark in question is indeed heavily allocating/deallocating small chunks of memory, but we would not expect such a dramatic effect on the runtime based on "random" factors.
Is there a way to determine if the root cause for this problem is in our code or the Windows 8 low frag heap implementation?
Best regards
Stephan