A possible cause for this issue is the Windows “Processor power management” setting. Depending on the version of Windows, you might find it here:
Control Panel > Power Options > Change Plan Settings > Change advanced power settings > Processor power management.
Change the “Minimum processor state” to 100%
Change the “Maximum processor state” to 100%
You might check the other settings while you’re in that dialog so that you don’t have important things going to sleep or hibernating when nobody is interacting with the computer.