int prof(void (*func)(unsigned __int64*, unsigned __int64*, char), unsigned __int64* p1, unsigned __int64* p2, char c)
{
__int64 start, end, freq;
HANDLE hprocess;
DWORD oldclass;

hprocess = GetCurrentProcess();
oldclass = GetPriorityClass(hprocess);

Sleep(10);
SetPriorityClass(hprocess, REALTIME_PRIORITY_CLASS);
QueryPerformanceFrequency((LARGE_INTEGER*)&freq);
QueryPerformanceCounter((LARGE_INTEGER*)&start);

func(p1, p2, c);

QueryPerformanceCounter((LARGE_INTEGER*)&end);
SetPriorityClass(hprocess, oldclass);

return (int)(end - start);
}

int main()
{
unsigned __int64* p1 = new unsigned __int64[SIZE];
unsigned __int64* p2 = p1 + SIZE;
char c = 0xff;

std::cout << "func1 = " << prof(func1, p1, p2, c) << std::endl;
std::cout << "func2 = " << prof(func2, p1, p2, c) << std::endl;
}