function RdTSC : int64; register; asm db $0f, $31 end;
function GetCyclesPerSecond : int64; var hF, T, et, sc : int64; begin QueryPerformanceFrequency(hF); QueryPerformanceCounter(T); et := T + hF; sc := RdTSC; repeat QueryPerformanceCounter(T); until (T >= et); Result := RdTSC - sc; end;