Maximize the output of your CPU (Keep your CPU in full power mode)

Recently I am working on UI decoding optimization. I found this program, Full Throttle Override, is very useful, and it can fully release the power of your CPU.

To balance of power consumption and performance, almost all x86 CPUs support either Cool’n’Quiet or SpeedStep or PowerNow! technology, which can dynamically adjust the CPU frequency based on the loading.

I found it’s pretty easy to implement Full Throttle Override and here is the core C++ code

void FullThrottle()
    memset(&osvi, 0, sizeof(OSVERSIONINFO));
    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    // For Vista and above
    if (osvi.dwMajorVersion >= 6)
	GUID *scheme;
	PowerGetActiveScheme(NULL, &scheme);
            , scheme
            , 100);
	PowerSetActiveScheme(NULL, scheme);
	MessageBox(NULL, L"Not supported by your OS!",L"",0);