Hacker News new | ask | show | jobs
by rasz 1686 days ago
Unreal 1 engine had same issue - modern dynamic clock CPUs confuse it https://forums.beyondunreal.com/threads/ut-goty-and-framerat...

From memory it was something like UT99 running a loop to determine CPU speed at the start when most modern CPUs are running at a lower clock, and when you start actually playing CPU speeds up and game engine goes crazy.

ah found it https://www.vogons.org/viewtopic.php?p=328803#p328803

"UT uses the RDTSC instruction to measure time. This is an assembler instruction that reads the "Cycle Counter" value from your CPU."

1 comments

> This is an assembler instruction that reads the "Cycle Counter" value from your CPU."

It did that ~10 years ago. On modern CPUs however, that instruction reads a counter which grows at the stock frequency of the CPU (e.g. at 3.6GHz for Ryzen 5 3600), regardless of frequency scaling of any of the cores.