Thread are slower in cooked game

This is kind of hard to take it as a valid test in UE4 you suppose to use UE4 API. Can you try to do the same with FDateTime, TArray, FMath and potentially with UE4 stat system:

You can also use Unreal Insights:

Anyway UE4 is out of control of your thread when your code loop, it does not got thru any control code aspecially as you use C++ standard API UE4 is complitly unaware what are you doing in that thread. OS is one deciding when and how it is executed on CPU or else UE4 telling OS to do something with it, so it’s either that that or compilationconfiguration diffrence makes something

Also make sure to do run on both Development build and Shipping build as both are complitly diffrent builds on UE4