Simple threads behave differently in UE4 versus UE5.

I was testing very simple threads with an infinite while(true) loop to check the CPU time given to these newer threads. I used FPlatformTime::Cycle64 and not any specialized thread profiler.

I used this measurement of time to keep checking how much does the CPU dedicate time to these new threads.

The results were like this: with the exception of the very first few hundreds of milliseconds immediately after the creation of the threads, the CPU will always give threads enough time so that the difference in time between two consecutive readings was always (literally for half an hour of testing) always less than 0.5 milliseconds (by a lot).

All fine and dandy. I repeated the exact same test on UE5, and I was blown away by much bigger delta time measurements. A lot of readings showed 0.75ms+, many even more than 1.5ms.

I am here to ask if anybody has any idea about why is that happening, and potential ways to get the same results in UE5?

By the way, the project is just a brand new First Person Project on both engines.

Also I don’t think it has to do with the priority of the threads as I experimented with different priorities, but that would need more testing for me to confirm that definitely.

Any idea?

Btw, the threads I used are simple winapi threads done inside WindowsApplication.cpp, so the phenomenon couldn’t be due to UE5 new job scheduling as I understand.